|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-12-30 18:51 UTC] cmb@php.net
-Package: Feature/Change Request
+Package: Apache related
[2017-01-08 06:09 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: krakjoe
[2017-01-08 06:09 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Description: ------------ i have tested the virtual("file2.php"); feature in php 4.3.3. now it behaves like an include in every way. but i think it would be better to parse the script as there were no calling script, so it were called through apache, so that the variable $test would not be changed in the called script and the $_SERVER["PHP_SELF"] has to be the called script, not the calling. so it would be good to add a new parameter to virtual() to set some ini options for the called script (espacially the "open_basedir" and "safe_mode" options, or in the apache per directory settings of the called script) to allow customers to add there own php scripts in a kind of more controlled environement. Reproduce code: --------------- <!-- called.php --> <?php echo("this is: " . $_SERVER["PHP_SELF"] . "<br>"); $test = "variable has changed"; ?> <!-- per_include.php --> include:<br> <?php $test = "variable set"; include("called.php"); echo($test); ?> <!-- per_virtual.php --> virtual:<br> <?php $test = "variable set"; virtual("called.php"); echo($test); ?> Expected result: ---------------- include: this is: /path/per_include.php variable has changed virtual: this is: /path/called.php variable set Actual result: -------------- include: this is: /path/per_include.php variable has changed virtual: this is: /path/per_virtual.php variable has changed