|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46972 php.ini is not loaded from registry
Submitted: 2008-12-30 13:09 UTC Modified: 2013-10-15 11:54 UTC
Avg. Score:4.8 ± 0.4
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:3 (50.0%)
From: leonardo at kreativ dot ro Assigned: pajoye (profile)
Status: No Feedback Package: PHP options/info functions
PHP Version: 5.2.8 OS: win32 only - Windows 2003
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
21 - 18 = ?
Subscribe to this entry?

 [2008-12-30 13:09 UTC] leonardo at kreativ dot ro
As described in the documentation at: the file php.ini is loaded from Windows Registry as follows:

"[...] in order: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z\IniFilePath, HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y\IniFilePath and HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x\IniFilePath, where x, y and z mean the PHP major, minor and release versions."

a) The file resides in the path d:\php\5.2.8.
b) I use php5isapi.dll on IIS 6 on Windows 2003
c) I inserted this key in the registry as follows:


but it still doesn't work. phpinfo() reports the configuration path as C:\WINDOWS.

I guess either the documentation lacks of specific details about the registry settings or this 5.2.8 version ignores the registry settings.

For me it is important so that this setting should work because I intend to keep several versions of PHP in the future and I don't want to change the environment settings (Path or PHPRC).

Expected result:
To load the php.ini from Windows Registry.

Actual result:
It loads the php.ini from C:\Windows


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-10 09:56 UTC] lorenzo at perusia dot it
Same problem experienced on Windows XP
 [2013-07-30 02:28 UTC]
-Status: Assigned +Status: Feedback
 [2013-07-30 02:28 UTC]
Please try using this snapshot:
For Windows:

 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC