ID:               49375
 User updated by:  hervec at gmail dot com
 Reported By:      hervec at gmail dot com
-Status:           Closed
+Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

reopen...


Previous Comments:
------------------------------------------------------------------------

[2009-08-26 15:39:32] 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 ?

------------------------------------------------------------------------

[2009-08-26 15:11:21] [email protected]

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:07:27] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49375&edit=1

Reply via email to