php.net |  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
Votes:1
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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hervec at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-26 15:07 UTC] hervec at gmail dot com
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-26 15:11 UTC] jani@php.net
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 :
[HOST=example.com]
php_admin_value open_basedir "/home/example.com"

it is painful !

I want it more like this :

[HOST=_default_]
php_admin_value open_basedir "/restrict"
[HOST=*]
php_admin_value open_basedir "/home/$HOST"

Or maybe using Regex in HOST=

[HOST="^([^.]+\.)*([^\.]+\.[^\.]+)$"]
php_admin_value open_basedir "/home/$2"

is it possible ?
 [2010-11-24 14:53 UTC] jani@php.net
-Summary: Mass Virtual Hosting Enhancements ? +Summary: Mass Virtual Hosting Enhancements -Package: Feature/Change Request +Package: Apache2 related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Oct 21 18:01:27 2019 UTC