|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49375 Mass Virtual Hosting Enhancements
Submitted: 2009-08-26 15:07 UTC Modified: 2021-09-26 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: hervec at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Apache2 related
PHP Version: 5.2.10 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hervec at gmail dot com
New email:
PHP Version: OS:


 [2009-08-26 15:07 UTC] hervec at gmail dot com
I want to be able to set open_basedir value with apache environmental variable. This can permit to do dynamic restriction, like restrict acces to the DOCUMENT_ROOT value

There was plenty of patches before, who never come to vanilla...

Reproduce code:
php_admin_value open_basedir "$DOCUMENT_ROOT"
or if you prefer
php_admin_value open_basedir "$SERVER['DOCUMENT_ROOT']"

Expected result:
restrict access to file in DocumentRoot

Actual result:
not working


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-26 15:11 UTC]
To have per-host / per-dir settings, just upgrade to PHP 5.3 which already has this feature set for FastCGI.

 [2009-08-26 15:39 UTC] hervec at gmail dot com
this is not dynamic, it force me to declare more than 1500+ vhost like this :
php_admin_value open_basedir "/home/"

it is painful !

I want it more like this :

php_admin_value open_basedir "/restrict"
php_admin_value open_basedir "/home/$HOST"

Or maybe using Regex in HOST=

php_admin_value open_basedir "/home/$2"

is it possible ?
 [2010-11-24 14:53 UTC]
-Summary: Mass Virtual Hosting Enhancements ? +Summary: Mass Virtual Hosting Enhancements -Package: Feature/Change Request +Package: Apache2 related
 [2021-09-14 13:56 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-14 13:56 UTC]
> is it possible ?

Maybe, but open_basedir isn't a security feature[1], so you're
likely looking for the wrong solution, especially if this is about
shared hosting, what it appears to be.

[1] <>
 [2021-09-26 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 08:03:36 2021 UTC