|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55778 PHPIniDir only works correctly for forward slashes, not backward slashes
Submitted: 2011-09-25 12:52 UTC Modified: 2011-10-03 19:24 UTC
From: marc at leftek dot com Assigned: jmertic (profile)
Status: Closed Package: Windows Installer
PHP Version: 5.3.8 OS: Windows 7
Private report: No CVE-ID: None
 [2011-09-25 12:52 UTC] marc at leftek dot com
I think it was the installer that put the line in my httpd.conf:
PHPIniDir "C:\Program Files (x86)\PHP\"

This resulted in phpinfo() producing:
Configuration File (php.ini) Path	C:\Windows
Loaded Configuration File	(none)

This causes the INI not to be found and PHP just uses defaults. Changing the 
slashes in the above line to:
PHPIniDir "C:/Program Files (x86)/PHP/"

and phpinfo() correctly produces:
Configuration File (php.ini) Path	C:\Windows
Loaded Configuration File	C:\Program Files (x86)\PHP\php.ini

Hopefully this can get changed to accept either kind of slash since Windows 
Installer seems to use the wrong one.  Also it would be helpful to have apache 
output an error log if no php.ini was found in the expected location and it was 
switching to defaults.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-25 13:06 UTC]
-Assigned To: +Assigned To: jmertic
 [2011-09-25 13:06 UTC]
John, can you take a look please?
 [2011-10-03 19:23 UTC]
Automatic comment from SVN on behalf of jmertic
Log: Bug 55778 - Write out httpd.conf with forward slashes on Windows 7.
 [2011-10-03 19:24 UTC]
-Status: Assigned +Status: Closed
 [2011-10-03 19:24 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 08:01:31 2024 UTC