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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: p dot duda at lumasenseinc dot com
New email:
PHP Version: OS:

 

 [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-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 19:01:23 2020 UTC