php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53696 erroneous automatic entry into httpd.conf
Submitted: 2011-01-08 14:53 UTC Modified: 2011-03-16 08:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: helge dot rowold at datendrexler dot de Assigned: jmertic (profile)
Status: Closed Package: Apache2 related
PHP Version: 5.3.5 OS: Windows 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: helge dot rowold at datendrexler dot de
New email:
PHP Version: OS:

 

 [2011-01-08 14:53 UTC] helge dot rowold at datendrexler dot de
Description:
------------
After having installed httpd-2.2.17-win32-x86-openssl-0.9.8o.msi successfully, but NOT at the default path but at a separate HDD partition with a non-default root directory, I was able to install the php-5.3.5-Win32-VC6-x86.msi at the same partition in a non-default directory, too. The installer echoed that everything would have been done well.

But the Apache Service did not start, then!

At the end I was able to fix the issue:

In httpd.conf, the PHP installer had tried to add the default linkage from HTTPD to PHP by adding the lines
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir ""
LoadModule php5_module "php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

  -  i. e., PHP was NOT able to set the correct (non-default) path to its own directory (which would have been, by the way, "D:/Programme/PHP535/").

Test script:
---------------
Please see above  -  addition of the correct path in httpd.conf did fix the error.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-08 14:57 UTC] pajoye@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jmertic
 [2011-01-08 14:57 UTC] pajoye@php.net
hi John,

Something went wrong in the last installer update.
 [2011-01-10 11:18 UTC] alvaro at demogracia dot com
Same symptoms here under Windows XP. Apache cannot find php5apache2_2.dll even if at default location:

The Apache service named  reported the following error:
>>> httpd.exe: Syntax error on line 516 of C:/Archivos de programa/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Archivos de programa/Apache Software Foundation/Apache2.2/php5apache2_2.dll into server: No se puede encontrar el m\xf3dulo     .

Copying settings from PHP/5.3.4 fixes the issue:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Archivos de programa/PHP/"
LoadModule php5_module "C:/Archivos de programa/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
 [2011-01-19 21:57 UTC] jmertic@php.net
-Status: Assigned +Status: Closed
 [2011-01-19 21:57 UTC] jmertic@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2011-03-16 04:48 UTC] masikwha at yahoo dot com
the problems discussed here for windows 7 seems to be far different than what I am experincing on Vista. After successful installatioin of  Apache 2.2.17 on Vista, php-5.3.5-Win32-VC9-x86 (Thread safe) installer seems to add following lines on httpd.conf file,

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ ""
Action application/x-httpd-php "php-cgi.exe"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

(Note there is no PHPIniDir  )
On restarting the apache it gives error saying,
ScriptAlias takes two names, fake name and real name...

I tried commenting  #CriptAlias /php/ "" , Apache runs ok but it doesn't php is not working. 
For proper installation of PHP 5.3.5 is that all the changes necessary ?? (which however is not working )?
 [2011-03-16 08:09 UTC] helge dot rowold at datendrexler dot de
Hello masikwha,

in my opinion you should be able to fix the error on Vista, too, by adding the following two lines to your httpd.conf file (in case you would like to use PHP as Apache module and *not* via CGI):

PHPIniDir "php_partition_char:/php_program_path/php_dir_name/"

LoadModule php5_module "php_partition_char:/php_program_path/php5apache2_2.dll"

The strings php_partition_char, php_program_path, and php_dir_name have to be replaced with the real path to your PHP installation directory, of course.
 [2011-03-16 20:14 UTC] masikwha at yahoo dot com
Adding to http.conf following:
PHPInidir "C:/PHP"
LoadModule php5_module "php5apache2_2.dll"



Error: Invalid command 'PHPIniDir' perhaps misspelled or defined by a module not included in the server configuration.. 

While installing php 5.3.5 with installer, gives you option to choose web server from a list of many,
I chose Apache 2.2x module, but this adds to http.conf
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ ""
Action application/x-httpd-php "php-cgi.exe"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

So tried installing php5.3.3 without selecting web server, this adds nothing to http.conf file but adding 
PHPIniDir ...  gives error
I have repeated the installation process of PHP manually as well by extracting zipped files to C:/PHP folder same result.

Seems like PHIIniDir directive in http.conf file is not understood by Apache 2.2.17, hence I tried installing apache 2.2.064(previous version) but the same result.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC