Files
cloud-apache-container/ext/cac-path-parity/tests/006-not-overridable.phpt
T

26 lines
819 B
PHP
Raw Normal View History

--TEST--
cac_path_parity: mapping is PHP_INI_SYSTEM userland cannot change it
--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
--FILE--
<?php
// PHP_INI_SYSTEM entries are not modifiable at runtime, and .user.ini honours
// only PHP_INI_PERDIR|PHP_INI_USER — so a customer cannot redirect or disable
// the rewrite the way they can displace an auto_prepend_file.
var_dump(ini_set('cac_path_parity.from', '/tmp'));
var_dump(ini_set('cac_path_parity.to', '/tmp'));
var_dump(ini_get('cac_path_parity.from'));
var_dump($_SERVER['CONTEXT_DOCUMENT_ROOT']);
?>
--EXPECT--
bool(false)
bool(false)
string(23) "/mnt/users/bob/site.com"
string(21) "/home/bob/public_html"