Annotation of embedaddon/php/ext/standard/tests/general_functions/putenv_error1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: putenv() - usage in safe mode with safe_mode_allowed_env_vars set
! 3: --CREDITS--
! 4: Brian DeShong <brian@deshong.net>
! 5: --INI--
! 6: safe_mode=1
! 7: safe_mode_allowed_env_vars=TESTING_
! 8: --FILE--
! 9: <?php
! 10: putenv('FOO=bar');
! 11: putenv('BAZ=bop');
! 12: $set = putenv('TESTING_FOO=bar');
! 13: print ($set ? 'it worked' : 'boo') . "\n";
! 14: $set = putenv('TESTING_BAR=baz');
! 15: print ($set ? 'it worked' : 'boo') . "\n";
! 16: ?>
! 17: ==DONE==
! 18: --EXPECTF--
! 19: Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
! 20:
! 21: Warning: putenv(): Safe Mode warning: Cannot set environment variable 'FOO' - it's not in the allowed list in %s on line %d
! 22:
! 23: Warning: putenv(): Safe Mode warning: Cannot set environment variable 'BAZ' - it's not in the allowed list in %s on line %d
! 24: it worked
! 25: it worked
! 26: ==DONE==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>