Re: per directory ini file overides.
| From: | Terence | Date: | Tue, 20 Aug 2002 05:15:19 +0000 |
| Subject: | Re: per directory ini file overides. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87126@lists.php.net to get a copy of this message | ||
I guess the concept may be similar (but not the same as) .htaccess files in that the main configuration file could choose not to "Allow Override"
As an alternative to the _php.ini files, the main php.ini file could have directive "containers" which applied to specific directories, much like the apache <Directory> tag.
Thoughts?
This extra parsing may impact on performance :(
...particularly for CGI implementations.
Unless of course you turn it off in your main php.ini file :)
Terence wrote:
Wouldn't that be nice? I reckon you should be able to drop a php.ini file into a directory where your scripts are and it could then contain directives which overide the globabl settings. That way you could solve problems like register globals and magic quotes on a per directory (application) bases. As an extension to that, the file should optionally apply to cascading subdirectories (recursive mode). Perhaps this could be done by virtue of it's file name. so _php.ini applies to the current directory, and __php.ini applies to all sub-directories. What say ye all? I know all the crap could be achived with include files but that's just messy and is way too much trouble when the whole reason why you're doing it is to install some off-the-shelf app. Doing it this way means developers can distribute an app with one __php.ini file in the top dir and everything would look after itself. It goes without saying that this is _not_ a substitute for good programming.