RE: [PHP-DEV] Location in php's source for ini-values
| From: | Jani Taskinen | Date: | Mon, 04 Feb 2008 13:40:52 +0000 |
| Subject: | RE: [PHP-DEV] Location in php's source for ini-values | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35172@lists.php.net to get a copy of this message | ||
Perhaps you should look into PHP 5.3 which has a lot better support for
per-host/per-dir php.ini values. In 5.3 you can specify stuff in the
global php.ini file with special sections which only affect the certain
host / directory and those can not be overwritten anywhere.
Also there's the user.ini (== pretty much same as .htaccess in apache).
Unfortunately this all is meant for CGI/FastCGI currently. And who uses
apache anyway anymore when we have lighttpd + fastcgi around? :D
--Jani
On Mon, 2008-02-04 at 11:08 +0000, ehl lhe wrote:
> 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/
--
Patches/Donations: http://pecl.php.net/~jani/