|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48031 Per-directory configuration files completely override master configuration file
Submitted: 2009-04-20 21:11 UTC Modified: 2009-04-20 21:28 UTC
From: hyponiq at gmail dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.2.9 OS: Windows Vista/IIS 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hyponiq at gmail dot com
New email:
PHP Version: OS:


 [2009-04-20 21:11 UTC] hyponiq at gmail dot com
When using per-directory or per-host php.ini files, none of the master file's configuration settings are read (i.e. from "C:\Server\PHP\PHP5\php.ini").  PHP requires that all settings that are needed to have a value be set per-directory/per-host.  In my mind, PHP should load the default configuration file (i.e. C:\Server\PHP\PHP5\php.ini) as well as the per-directory/per-host config file (i.e. C:\Server\Sites\Framework\php.ini), load the directives from the master file, and then override/replace the values for those directives from the child config file.

Reproduce code:
master php.ini:
cgi.force_redirect = 0
doc_root =
extension_dir = "C:/Server/PHP/PHP5/ext"

Host php.ini:
doc_root = "C:\Server\Sites\Framework"

Expected result:
when phpinfo() executed:
System Information
Loaded Configuration File(s): C:\Server\Sites\Framework\php.ini; C:\Server\PHP\PHP5\php.ini

Directive Values
cgi.force_redirect: Local: 0; Master: 0;
doc_root: Local: C:\Server\Sites\Framework; Master: no value;
extension_dir: Local: C:/Server/PHP/PHP5/ext; Master: C:/Server/PHP/PHP5/ext

Actual result:
when phpinfo() executed:
System Information
Loaded Configuration File: C:\Server\Sites\Framework\php.ini

Directive Values
cgi.force_redirect: Local: no value; Master: no value
doc_root: Local: C:\Server\Sites\Framework; Master: C:\Server\Sites\Framework
extension_dir: Local: no value; Master: no value


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-20 21:28 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 16 12:05:45 2022 UTC