Bug #13810 Updated: Per directory php.ini overrides
| From: | richard at alavator dot com | Date: | Thu, 25 Oct 2001 03:19:42 +0000 |
| Subject: | Bug #13810 Updated: Per directory php.ini overrides | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-68983@lists.php.net to get a copy of this message | ||
ID: 13810
User updated by: richard@alavator.com
Reported By: richard@alavator.com
Status: Open
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 4.0.6
New Comment:
I tried writing wrappers for PHP that called it with -d OPTION, and -s to show source, and then
creating an apache Action in the .htaccess file, but this did now work, as PHP ignores the command
line parameters when invoked as a CGI.
Another suitable workaround would be at have PHP pay attention to CERTAIN command line parameters
(such as -d and -s) but refuse to process files specified on the command line, and only allow the
adjustment of certain options.
Previous Comments:
------------------------------------------------------------------------
[2001-10-24 05:24:45] richard@alavator.com
I run a server and have always used .htaccess to modify php settings on a per directory basis. I am
now opening my server to other people, so I need to refine the security model, which prevents me
from using PHP as a module.
Unfortunately, I can't use PHP as a CGI at this time, because I have no way of changing options
on a per directory basis.
I would be nice if PHP could be compiled with an option which would have it perform the following
actions each time it is invoked as a CGI:
1. Parse the normal configuration file
2. Look in each directory from the document root to the script directory, and progressively parse
php.ini files in those directories "overriding" any settings from the main php.ini file
(but not otherwise disturbing the php configuration)
This is probably a fairly intensive hit for memory hungry machines, but AFAIK, it is the only way to
provide per-directory PHP options in a similar mannar to .htaccess on servers which don't have
.htaccess, or where security makes using .htaccess impossible.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13810&edit=1