php-src/sapi/tests/test004.phpt
Shane Caraveo b671380b6b many new enhancements to run-tests that allow for testing cgi and other
sapi modules via http.  see README.TESTING2 for more details
several sapi tests added
2003-03-25 07:45:18 +00:00

27 lines
637 B
PHP

--TEST--
Apache style CGI with PATH_INFO
--DESCRIPTION--
Apache likes to set SCRIPT_FILENAME to the php executable
if you use ScriptAlias configurations, and the proper
path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked,
but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias
of the executable.
--REQUEST--
return <<<END
PATH_INFO=/path/info
END;
--ENV--
return <<<END
REDIRECT_URL=$scriptname
PATH_TRANSLATED=$filename/path/info
PATH_INFO=$scriptname/path/info
SCRIPT_NAME=/scriptalias/php
SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE']
END;
--CGI--
--FILE--
<?php
echo $_SERVER['PATH_INFO'];
?>
--EXPECT--
/path/info