002.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. $php = get_cgi_path();
  11. reset_env_vars();
  12. $file = __DIR__."/002.test.php";
  13. file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>');
  14. var_dump(`$php -n -d max_execution_time=111 $file`);
  15. var_dump(`$php -n -d max_execution_time=500 $file`);
  16. var_dump(`$php -n -d max_execution_time=500 -d max_execution_time=555 $file`);
  17. file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); var_dump(ini_get("upload_tmp_dir")); ?>');
  18. var_dump(`$php -n -d upload_tmp_dir=/test/path -d max_execution_time=555 $file`);
  19. unlink($file);
  20. echo "Done\n";
  21. ?>
  22. --EXPECTF--
  23. string(%d) "X-Powered-By: PHP/%s
  24. Content-type: text/html%r; charset=.*|%r
  25. string(3) "111"
  26. "
  27. string(%d) "X-Powered-By: PHP/%s
  28. Content-type: text/html%r; charset=.*|%r
  29. string(3) "500"
  30. "
  31. string(%d) "X-Powered-By: PHP/%s
  32. Content-type: text/html%r; charset=.*|%r
  33. string(3) "555"
  34. "
  35. string(%d) "X-Powered-By: PHP/%s
  36. Content-type: text/html%r; charset=.*|%r
  37. string(3) "555"
  38. string(10) "/test/path"
  39. "
  40. Done