summaryrefslogtreecommitdiff
path: root/sapi/tests/test004.phpt
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /sapi/tests/test004.phpt
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'sapi/tests/test004.phpt')
-rw-r--r--sapi/tests/test004.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/sapi/tests/test004.phpt b/sapi/tests/test004.phpt
new file mode 100644
index 0000000..ef43774
--- /dev/null
+++ b/sapi/tests/test004.phpt
@@ -0,0 +1,26 @@
+--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=/path
+PATH_TRANSLATED=/path/info/fpp
+PATH_INFO=/path/info
+SCRIPT_NAME=/scriptalias/php
+SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE']
+END;
+--FILE--
+<?php
+ echo $_SERVER['PATH_INFO'];
+?>
+--EXPECT--
+/path/info \ No newline at end of file