Annotation of embedaddon/php/sapi/cgi/tests/002.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: defining INI options with -d
! 3: --SKIPIF--
! 4: <?php
! 5: include "skipif.inc";
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: include "include.inc";
! 10:
! 11: $php = get_cgi_path();
! 12: reset_env_vars();
! 13:
! 14: $file = dirname(__FILE__)."/002.test.php";
! 15:
! 16: file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>');
! 17:
! 18: var_dump(`$php -n -d max_execution_time=111 $file`);
! 19: var_dump(`$php -n -d max_execution_time=500 $file`);
! 20: var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`);
! 21:
! 22: file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); var_dump(ini_get("upload_tmp_dir")); ?>');
! 23:
! 24: var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 $file`);
! 25:
! 26: unlink($file);
! 27:
! 28: echo "Done\n";
! 29: ?>
! 30: --EXPECTF--
! 31: string(%d) "X-Powered-By: PHP/%s
! 32: Content-type: text/html%r; charset=.*|%r
! 33:
! 34: %unicode|string%(3) "111"
! 35: "
! 36: string(%d) "X-Powered-By: PHP/%s
! 37: Content-type: text/html%r; charset=.*|%r
! 38:
! 39: %unicode|string%(3) "500"
! 40: "
! 41: string(%d) "X-Powered-By: PHP/%s
! 42: Content-type: text/html%r; charset=.*|%r
! 43:
! 44: %unicode|string%(3) "555"
! 45: "
! 46: string(%d) "X-Powered-By: PHP/%s
! 47: Content-type: text/html%r; charset=.*|%r
! 48:
! 49: %unicode|string%(3) "555"
! 50: %unicode|string%(10) "/test/path"
! 51: "
! 52: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>