php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60254 PHPIniDir format incorrect
Submitted: 2011-11-09 20:56 UTC Modified: 2015-06-09 16:04 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: p dot duda at lumasenseinc dot com Assigned: cmb (profile)
Status: Wont fix Package: Windows Installer
PHP Version: 5.3.8 OS: Window 7
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:
MUST BE VALID
Solve the problem:
46 + 39 = ?
Subscribe to this entry?

 
 [2011-11-09 20:56 UTC] p dot duda at lumasenseinc dot com
Description:
------------
When installing php into a different directory on Windows the installer amends the httpd.conf file with the PHPIniDir using backslashes in the path.  This renders the directive useless, and php looks for the ini file elsewhere. Changing the path to forward slashes resolves the problem.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-11 23:28 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jmertic
 [2012-01-12 23:44 UTC] agvulp-forums at yahoo dot com
Confirmed.

I just installed Apache 2.2 and PHP 5.3.8 in Windows.

The PHP installer asks for the location of the Apache httpd.conf file, so it can amend these lines to the end of it.

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\PHP\"
LoadModule php5_module "C:\WEB\PHP\php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

However.  Apache 2.2 (and others?) anticipates forward slashes instead of back slashes, and will transmogrify the two internally when it actually goes to read the file.  (Apache literally replaces '\' with '/' and '/' with '\' when compiled for Windows.)

Solution.  The above line should be:

PHPIniDir "C:/PHP/"

Eric
 [2015-06-09 16:04 UTC] cmb@php.net
-Status: Assigned +Status: Wont fix -Assigned To: jmertic +Assigned To: cmb
 [2015-06-09 16:04 UTC] cmb@php.net
This ticket is obsolete, because Microsoft installer binaries
(.msi) are not distributed anymore as of PHP 5.4.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC