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