|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-01-11 10:41 UTC] markku dot niskanen at gmail dot com
[2013-04-19 10:42 UTC] steven dot hartland at multiplay dot co dot uk
[2013-04-30 18:11 UTC] stas@php.net
-Assigned To:
+Assigned To: fat
[2013-04-30 18:11 UTC] stas@php.net
-Package: PHP options/info functions
+Package: FPM related
[2013-05-20 14:22 UTC] 63965 dot phpbug at tomvalentine dot net
[2013-05-20 14:29 UTC] 63965 dot phpbug at tomvalentine dot net
[2013-11-19 17:11 UTC] andy at propcom dot co dot uk
[2015-07-24 20:20 UTC] butesa at freenet dot de
[2017-10-24 07:45 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: fat
+Assigned To:
[2023-07-07 06:18 UTC] Apsaraofdelhi at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
Description: ------------ # this is an nginx configuration for *.thiscustomer.com # it should ONLY affect *.thiscustomer.com, no other domains server { server_name .thiscustomer.com; #... normal stuff removed ... location ~ \.php$ { # now set for THIS site fastcgi_param PHP_VALUE "auto_prepend_file=/home/thiscustomer/lib/modules/ThisModule.class.php"; # ..other normal stuff from this on... } } Test script: --------------- Now first simply go any other site, say "www.thatcustomer.com" on the same server and everything works fine. Then go to "www.thiscustomer.com" (the example site) and everything works fine. Then again go to "www.thatcustomer.com" and you will see that you will have an "open_basedir restriction", PHP trying to load file (prepending) /home/thiscustomer/lib/modules/ThisModule.class.php So the auto_prepend_file value is changed GLOBALLY and permanently until some other domain changes it again. The same goes for ANY PHP_VALUE or PHP_ADMIN_VALUE but this is the one that will definitely break all sites. Tested in PHP 5.3.19 and 5.3.20, two different servers, two different operating systems (Centos 5.8 and Centos 6.2).