RE: [PHP-DEV] Location in php's source for ini-values

From: Date: Mon, 04 Feb 2008 11:08:43 +0000
Subject: RE: [PHP-DEV] Location in php's source for ini-values
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-35171@lists.php.net to get a copy of this message
hi steph, well, i'm trying to use apache's mod vhost_alias, which doesn't allow to use e.g. php_admin_value open_basedir /some/path/%2 ...which means that %2 is usually replaced with a part of the requested URI, but that does not work, such variables like %2 are interpreded for vhost_alias-values such as VirtualDocumentRoot only. I'm modifying php's source anyway for other purposes and so i thought it might be a pretty good solution to do so for this issue too, by taking that ZEND-variable which defines the location of the php-script it's beeing executed from. if it is for example: /var/www/users/tom/index.php then I thought to take the part between users/ and the following / to identify the user (tom in this case) - and then to set a static open_basedir-value at the location where php finally sets it in it's source. as far as i figured out, main/main.c sets the default values and main/php_ini.c seems to read them from the php.ini. as far as open_basedir is not overwriteable by .htaccess later, this might be the right location to modify it... regards, ehl _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

« previous php.internals (#35171) next »