xref: /PHP-7.2/sapi/tests/test004.phpt (revision f1d7e3ca)
1--TEST--
2Apache style CGI with PATH_INFO
3--DESCRIPTION--
4Apache likes to set SCRIPT_FILENAME to the php executable
5if you use ScriptAlias configurations, and the proper
6path is in PATH_TRANSLATED.  SCRIPT_NAME in this is faked,
7but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias
8of the executable.
9--REQUEST--
10return <<<END
11PATH_INFO=/path/info
12END;
13--ENV--
14return <<<END
15REDIRECT_URL=/path
16PATH_TRANSLATED=/path/info/fpp
17PATH_INFO=/path/info
18SCRIPT_NAME=/scriptalias/php
19SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE']
20END;
21--FILE--
22<?php
23    echo $_SERVER['PATH_INFO'];
24?>
25--EXPECT--
26/path/info
27