diff --git a/ext/phar/tests/cache_list/files/frontcontroller.phar b/ext/phar/tests/cache_list/files/frontcontroller.phar new file mode 100644 index 00000000000..626bf48acf0 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller10.phar b/ext/phar/tests/cache_list/files/frontcontroller10.phar new file mode 100644 index 00000000000..078ce75b2c7 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller10.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller11.phar b/ext/phar/tests/cache_list/files/frontcontroller11.phar new file mode 100644 index 00000000000..61ea8432221 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller11.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller12.phar b/ext/phar/tests/cache_list/files/frontcontroller12.phar new file mode 100644 index 00000000000..9e455876101 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller12.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller13.phar b/ext/phar/tests/cache_list/files/frontcontroller13.phar new file mode 100644 index 00000000000..750ff27a8e3 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller13.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller14.phar b/ext/phar/tests/cache_list/files/frontcontroller14.phar new file mode 100644 index 00000000000..78a42a999f0 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller14.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller16.phar b/ext/phar/tests/cache_list/files/frontcontroller16.phar new file mode 100644 index 00000000000..cce5db5bb5b Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller16.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller17.phar b/ext/phar/tests/cache_list/files/frontcontroller17.phar new file mode 100644 index 00000000000..b83d41fd5b8 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller17.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller18.phar b/ext/phar/tests/cache_list/files/frontcontroller18.phar new file mode 100644 index 00000000000..c447f397ac5 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller18.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller19.phar b/ext/phar/tests/cache_list/files/frontcontroller19.phar new file mode 100644 index 00000000000..bdf8ee13c20 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller19.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller2.phar b/ext/phar/tests/cache_list/files/frontcontroller2.phar new file mode 100644 index 00000000000..0dd0e7f6956 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller2.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller3.phar b/ext/phar/tests/cache_list/files/frontcontroller3.phar new file mode 100644 index 00000000000..afcf03af351 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller3.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller4.phar b/ext/phar/tests/cache_list/files/frontcontroller4.phar new file mode 100644 index 00000000000..4c9a92a197b Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller4.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller5.phar b/ext/phar/tests/cache_list/files/frontcontroller5.phar new file mode 100644 index 00000000000..f206b5996d7 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller5.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller6.phar b/ext/phar/tests/cache_list/files/frontcontroller6.phar new file mode 100644 index 00000000000..e3b6bb86a16 Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller6.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller7.phar b/ext/phar/tests/cache_list/files/frontcontroller7.phar new file mode 100644 index 00000000000..79672809b4e Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller7.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller8.phar b/ext/phar/tests/cache_list/files/frontcontroller8.phar new file mode 100644 index 00000000000..ec05ceafb0c Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller8.phar differ diff --git a/ext/phar/tests/cache_list/files/frontcontroller9.phar b/ext/phar/tests/cache_list/files/frontcontroller9.phar new file mode 100644 index 00000000000..39ca28c96cf Binary files /dev/null and b/ext/phar/tests/cache_list/files/frontcontroller9.phar differ diff --git a/ext/phar/tests/cache_list/frontcontroller1.phpt b/ext/phar/tests/cache_list/frontcontroller1.phpt new file mode 100644 index 00000000000..d0d5552f167 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller1.phpt @@ -0,0 +1,17 @@ +--TEST-- +Phar front controller other +--INI-- +phar.cache_list={PWD}/frontcontroller1.php [cache_list] +--SKIPIF-- + +--ENV-- +SCRIPT_NAME=/frontcontroller1.php +REQUEST_URI=/frontcontroller1.php/a.jpg +PATH_INFO=/a.jpg +--FILE_EXTERNAL-- +files/frontcontroller.phar +--EXPECTHEADERS-- +Content-type: image/jpeg +Content-length: 3 +--EXPECT-- +hio diff --git a/ext/phar/tests/cache_list/frontcontroller10.phpt b/ext/phar/tests/cache_list/frontcontroller10.phpt new file mode 100644 index 00000000000..d74471e0993 --- /dev/null +++ b/ext/phar/tests/cache_list/frontcontroller10.phpt @@ -0,0 +1,25 @@ +--TEST-- +Phar front controller rewrite access denied [cache_list] +--INI-- +default_charset= +phar.cache_list={PWD}/frontcontroller10.php +--SKIPIF-- + +--ENV-- +SCRIPT_NAME=/frontcontroller10.php +REQUEST_URI=/frontcontroller10.php/hi +PATH_INFO=/hi +--FILE_EXTERNAL-- +files/frontcontroller4.phar +--EXPECTHEADERS-- +Content-type: text/html +Status: 403 Access Denied +--EXPECT-- + +
+
+<?php function hio(){}
+
+
+
diff --git a/ext/phar/tests/cache_list/frontcontroller16.phpt b/ext/phar/tests/cache_list/frontcontroller16.phpt
new file mode 100644
index 00000000000..b5f485bab48
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller16.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type override, Phar::PHP [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller16.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller16.php
+REQUEST_URI=/frontcontroller16.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECT--
+hio1
+
diff --git a/ext/phar/tests/cache_list/frontcontroller17.phpt b/ext/phar/tests/cache_list/frontcontroller17.phpt
new file mode 100644
index 00000000000..35d3ae4e9cf
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller17.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller mime type unknown [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller17.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller17.php
+REQUEST_URI=/frontcontroller17.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+Content-length: 4
+--EXPECT--
+hio3
+
diff --git a/ext/phar/tests/cache_list/frontcontroller18.phpt b/ext/phar/tests/cache_list/frontcontroller18.phpt
new file mode 100644
index 00000000000..5e94bf6ff5e
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller18.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller18.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller18.php
+REQUEST_URI=/frontcontroller18.php/fronk.gronk
+PATH_INFO=/fronk.gronk
+--FILE_EXTERNAL--
+files/frontcontroller9.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'No values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller18.php:2
+Stack trace:
+#0 %sfrontcontroller18.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller18.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller19.phpt b/ext/phar/tests/cache_list/frontcontroller19.phpt
new file mode 100644
index 00000000000..bed0b1df31c
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller19.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 2 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller19.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller19.php
+REQUEST_URI=/frontcontroller19.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller10.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Too many values passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller19.php:2
+Stack trace:
+#0 %sfrontcontroller19.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller19.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller2.phpt b/ext/phar/tests/cache_list/frontcontroller2.phpt
new file mode 100644
index 00000000000..383a7dc67b2
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller2.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller PHP test [cache_list]
+--INI--
+default_charset=
+phar.cache_list=frontcontroller2.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller2.php
+REQUEST_URI=/frontcontroller2.php/a.php
+PATH_INFO=/a.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECT--
+hio
diff --git a/ext/phar/tests/cache_list/frontcontroller20.phpt b/ext/phar/tests/cache_list/frontcontroller20.phpt
new file mode 100644
index 00000000000..bf333c773cf
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller20.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller $_SERVER munging failure 3 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller20.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller20.php
+REQUEST_URI=/frontcontroller20.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller11.phar
+--EXPECTF--
+Fatal error: Uncaught exception 'PharException' with message 'Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME' in %sfrontcontroller20.php:2
+Stack trace:
+#0 %sfrontcontroller20.php(2): Phar::mungServer(Array)
+#1 {main}
+ thrown in %sfrontcontroller20.php on line 2
diff --git a/ext/phar/tests/cache_list/frontcontroller21.phpt b/ext/phar/tests/cache_list/frontcontroller21.phpt
new file mode 100644
index 00000000000..afc3eaf9541
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller21.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar front controller $_SERVER munging success [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller21.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller21.php
+REQUEST_URI=/frontcontroller21.php/index.php?test=hi
+PATH_INFO=/index.php
+QUERY_STRING=test=hi
+--FILE_EXTERNAL--
+files/frontcontroller12.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+string(10) "/index.php"
+string(10) "/index.php"
+string(%d) "phar://%sfrontcontroller21.php/index.php"
+string(18) "/index.php?test=hi"
+string(32) "/frontcontroller21.php/index.php"
+string(22) "/frontcontroller21.php"
+string(%d) "%sfrontcontroller21.php"
+string(40) "/frontcontroller21.php/index.php?test=hi"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller22.phpt b/ext/phar/tests/cache_list/frontcontroller22.phpt
new file mode 100644
index 00000000000..802f0c2343a
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller22.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Phar front controller include from cwd test 1 [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller22.phpt
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller22.php
+REQUEST_URI=/frontcontroller22.php/index.php
+PATH_INFO=/index.php
+--FILE_EXTERNAL--
+files/frontcontroller13.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+string(4) "test"
+string(12) "oof/test.php"
+
+Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d
+
+Warning: include(): Failed opening './hi.php' for inclusion (include_path='%s') in phar://%soof/test.php on line %d
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller23.phpt b/ext/phar/tests/cache_list/frontcontroller23.phpt
new file mode 100644
index 00000000000..4489e57247b
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller23.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with generic action router test [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller23.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller23.php
+REQUEST_URI=/frontcontroller23.php/hi/there
+PATH_INFO=/hi/there
+--FILE_EXTERNAL--
+files/frontcontroller14.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+string(9) "/hi/there"
+string(%d) "phar://%sfrontcontroller23.php/html/index.php"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller24.phpt b/ext/phar/tests/cache_list/frontcontroller24.phpt
new file mode 100644
index 00000000000..e09ba1f9904
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller24.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with custom 404 php script [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller24.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller24.php
+REQUEST_URI=/frontcontroller24.php/unknown/file
+PATH_INFO=/unknown/file
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+My 404 is rawesome
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller25.phpt b/ext/phar/tests/cache_list/frontcontroller25.phpt
new file mode 100644
index 00000000000..d63864c4f17
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller25.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar front controller with extra path_info [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller25.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller25.php
+REQUEST_URI=/frontcontroller25.php/a1.phps/extra/stuff
+PATH_INFO=/a1.phps/extra/stuff
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+string(42) "/frontcontroller25.php/a1.phps/extra/stuff"
+string(12) "/extra/stuff"
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller26.phpt b/ext/phar/tests/cache_list/frontcontroller26.phpt
new file mode 100644
index 00000000000..86a1c1444c1
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller26.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with unknown extension mime type [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller26.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller26.php
+REQUEST_URI=/frontcontroller26.php/unknown.ext
+PATH_INFO=/unknown.ext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: application/octet-stream
+--EXPECTF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller27.php
+REQUEST_URI=/frontcontroller27.php/noext
+PATH_INFO=/noext
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain
+--EXPECTF--
+hi
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller28.phpt b/ext/phar/tests/cache_list/frontcontroller28.phpt
new file mode 100644
index 00000000000..2c42ec099c3
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller28.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with huge file [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller28.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller28.php
+REQUEST_URI=/frontcontroller28.php/bigfile.txt
+PATH_INFO=/bigfile.txt
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/plain
+--EXPECT--
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/ext/phar/tests/cache_list/frontcontroller29.phpt b/ext/phar/tests/cache_list/frontcontroller29.phpt
new file mode 100644
index 00000000000..404efd09f16
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller29.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar front controller with fatal error in php file [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller29.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller29.php
+REQUEST_URI=/frontcontroller29.php/fatalerror.phps
+PATH_INFO=/fatalerror.phps
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECTF--
+Fatal error: Call to undefined function oopsie_daisy() in phar://%sfatalerror.phps on line 1
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller3.phpt b/ext/phar/tests/cache_list/frontcontroller3.phpt
new file mode 100644
index 00000000000..56a54636c7d
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller3.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Phar front controller phps [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller3.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller3.php
+REQUEST_URI=/frontcontroller3.php/a.phps
+PATH_INFO=/a.phps
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Content-type: text/html
+--EXPECT--
+
+<?php function hio(){}
+
+
diff --git a/ext/phar/tests/cache_list/frontcontroller30.phpt b/ext/phar/tests/cache_list/frontcontroller30.phpt
new file mode 100644
index 00000000000..5a63da874c2
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller30.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Phar front controller with weird SCRIPT_NAME [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller30.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/huh?
+REQUEST_URI=/huh?
+--FILE_EXTERNAL--
+files/frontcontroller8.phar
+--EXPECTF--
+oops did not run
+%a
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt
new file mode 100644
index 00000000000..48b9c9dc217
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller31.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with invalid callback for rewrites [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller31.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller31.php
+REQUEST_URI=/frontcontroller31.php
+--EXPECTHEADERS--
+Content-type: text/html
+--FILE_EXTERNAL--
+files/frontcontroller16.phar
+--EXPECT--
+phar error: invalid rewrite callback
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller32.phpt b/ext/phar/tests/cache_list/frontcontroller32.phpt
new file mode 100644
index 00000000000..076de91f146
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller32.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that is not good [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller32.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller32.php
+REQUEST_URI=/frontcontroller32.php
+--EXPECTHEADERS--
+Content-type: text/html
+--FILE_EXTERNAL--
+files/frontcontroller17.phar
+--EXPECTF--
+%ahar error: failed to call rewrite callback
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller33.phpt b/ext/phar/tests/cache_list/frontcontroller33.phpt
new file mode 100644
index 00000000000..42620fa754e
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller33.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller with valid callback that does not return any value [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller33.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller33.php
+REQUEST_URI=/frontcontroller33.php
+--EXPECTHEADERS--
+Content-type: text/html
+--FILE_EXTERNAL--
+files/frontcontroller18.phar
+--EXPECTF--
+phar error: rewrite callback must return a string or false
\ No newline at end of file
diff --git a/ext/phar/tests/cache_list/frontcontroller34.phpt b/ext/phar/tests/cache_list/frontcontroller34.phpt
new file mode 100644
index 00000000000..569a8e21ad5
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller34.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Phar front controller with cwd [cache_list]
+--INI--
+default_charset=
+phar.cache_list={PWD}/frontcontroller34.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller34.php
+REQUEST_URI=/frontcontroller34.php/start/index.php
+PATH_INFO=/start/index.php
+--EXPECTHEADERS--
+Content-type: text/html
+--FILE_EXTERNAL--
+files/frontcontroller19.phar
+--EXPECT--
+start/index.php
+start/another.php
+another.php
diff --git a/ext/phar/tests/cache_list/frontcontroller4.phpt b/ext/phar/tests/cache_list/frontcontroller4.phpt
new file mode 100644
index 00000000000..5cf36822770
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller4.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Phar front controller index.php relocate (no /) [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller4.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller4.php
+REQUEST_URI=/frontcontroller4.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller4.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller5.phpt b/ext/phar/tests/cache_list/frontcontroller5.phpt
new file mode 100644
index 00000000000..2c738d7bfb3
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller5.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar front controller index.php relocate [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller5.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller5.php
+REQUEST_URI=/frontcontroller5.php/
+PATH_INFO=/
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 301 Moved Permanently
+Location: /frontcontroller5.php/index.php
+--EXPECT--
diff --git a/ext/phar/tests/cache_list/frontcontroller6.phpt b/ext/phar/tests/cache_list/frontcontroller6.phpt
new file mode 100644
index 00000000000..2480be41293
--- /dev/null
+++ b/ext/phar/tests/cache_list/frontcontroller6.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar front controller 404 [cache_list]
+--INI--
+phar.cache_list={PWD}/frontcontroller6.php
+--SKIPIF--
+
+--ENV--
+SCRIPT_NAME=/frontcontroller6.php
+REQUEST_URI=/frontcontroller6.php/notfound.php
+PATH_INFO=/notfound.php
+--FILE_EXTERNAL--
+files/frontcontroller.phar
+--EXPECTHEADERS--
+Status: 404 Not Found
+--EXPECT--
+
+
+
+<?php function hio(){}
+
+
\ No newline at end of file