|  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: 2010-11-24 14:53 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:
Status: Open Package: Apache2 related
PHP Version: 5.2.10 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jul 25 23:01:24 2021 UTC