2026-08-05 11:38:19 -07:00
|
|
|
--TEST--
|
|
|
|
|
cac_path_parity: rewrites the configured prefix on a filesystem $_SERVER key
|
|
|
|
|
--EXTENSIONS--
|
|
|
|
|
cac_path_parity
|
|
|
|
|
--INI--
|
|
|
|
|
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
|
|
|
|
|
HTTP_HOST=site.com
|
|
|
|
|
--FILE--
|
|
|
|
|
<?php
|
|
|
|
|
// NOTE: the CLI SAPI overwrites DOCUMENT_ROOT (to "") and SCRIPT_FILENAME /
|
|
|
|
|
// PATH_TRANSLATED (to the script path) AFTER the env import, so those three
|
|
|
|
|
// cannot be driven from --ENV-- here. They go through the identical code path
|
|
|
|
|
// as CONTEXT_DOCUMENT_ROOT (one loop over one key table); the real web-SAPI
|
2026-08-05 13:06:10 -07:00
|
|
|
// proof for them is tests/fpm-parity-check.sh.
|
2026-08-05 11:38:19 -07:00
|
|
|
var_dump($_SERVER['CONTEXT_DOCUMENT_ROOT']);
|
|
|
|
|
// Non-path vars must be untouched.
|
|
|
|
|
var_dump($_SERVER['HTTP_HOST']);
|
|
|
|
|
?>
|
|
|
|
|
--EXPECT--
|
|
|
|
|
string(21) "/home/bob/public_html"
|
|
|
|
|
string(8) "site.com"
|