21 lines
633 B
PHP
21 lines
633 B
PHP
--TEST--
|
|||
|
|
cac_path_parity: works with auto_globals_jit=On (lazy $_SERVER, the default)
|
||
|
|
--EXTENSIONS--
|
||
|
|
cac_path_parity
|
||
|
|
--INI--
|
||
|
|
auto_globals_jit=1
|
||
|
|
cac_path_parity.from=/mnt/users/bob/site.com
|
||
|
|
cac_path_parity.to=/home/bob
|
||
|
|
variables_order=EGPCS
|
||
|
|
--ENV--
|
||
|
|
CONTEXT_DOCUMENT_ROOT=/mnt/users/bob/site.com/public_html
|
||
|
|
--FILE--
|
||
|
|
<?php
|
||
|
|
// With auto_globals_jit=On, $_SERVER does not exist yet when extension RINIT
|
||
|
|
// runs. The extension forces the auto-global so there is something to rewrite;
|
||
|
|
// drop that call and this test prints the /mnt/users path.
|
||
|
|
var_dump($_SERVER['CONTEXT_DOCUMENT_ROOT']);
|
||
|
|
?>
|
||
|
|
--EXPECT--
|
||
|
|
string(21) "/home/bob/public_html"
|