xref: /php-src/sapi/cgi/tests/009.phpt (revision 3bc34ef8)
1--TEST--
2path info request without exported PATH_INFO
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8include "include.inc";
9
10$php = get_cgi_path();
11reset_env_vars();
12
13$f = tempnam(sys_get_temp_dir(), 'cgitest');
14
15putenv("TRANSLATED_PATH=".$f."/x");
16putenv("SCRIPT_FILENAME=".$f."/x");
17file_put_contents($f, '<?php var_dump($_SERVER["TRANSLATED_PATH"]); ?>');
18
19echo (`$php -n $f`);
20
21echo "Done\n";
22
23@unlink($f);
24?>
25--EXPECTF--
26X-Powered-By: PHP/%s
27Content-type: text/html%r; charset=.*|%r
28
29string(%d) "%s/x"
30Done
31