php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52298 Apache service won't start with PHP enabled
Submitted: 2010-07-09 03:56 UTC Modified: 2010-07-21 22:51 UTC
From: murray at math dot umass dot edu Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.3.2 OS: Windows XP Pro (SP3)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: murray at math dot umass dot edu
New email:
PHP Version: OS:

 

 [2010-07-09 03:56 UTC] murray at math dot umass dot edu
Description:
------------
Summary: as soon as I add loading PHP 5.3.2 as a module, Apache 2.2.15 service won't start. Without the load, Apache service is OK; and PHP from command line is OK.

What I did:
(1) Installed Apache 2.2.15 in a localhost config from httpd-2.2.15-win32-x86-no_ssl.msi (also tried the openssl version when the former + PHP didn't work). That worked just fine.

(2) Installed PHP 5.3.2 from php-5.3.2-Win32-VC6-x86.msi (thread safe), which php.net says to use, as I read its instructions. (It says NOT to use the VC9 version with apache.org binaries.)

Now the apache httpd service will not start. So of course I never got so far as to try a .php script in the browser.

Of course I put the correct entries in PATH and PHPRC. My httpd.conf was what the apache installer set up plus my changes in appropriate spots.

I retried everything after completely uninstalling both apache http and PHP, again using httpd-2.2.15-win32-x86-no_ssl.msi but this time installing PHP manually from php-5.3.2-Win32-VC6-x86.zip.

File httpd.conf is what the Apache installer set up plus my edits in appropriate spots:

  ServerName localhost:80
  DocumentRoot "E:/htdocs"
  <Directory "E:/htdocs">
  LoadModule php5_module "D:/Server/PHP/php5apache2_2.dll"
  PHPIniDir "D:/Server/PHP"
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps 

My edits to php.ini are:

  PHPIniDir "D:/Server/PHP/"
  LoadModule php5_module "D:/Server/PHP/php5apache2_2.dll"

Apache error.log contains just:

  [warn] pid file D:/Server/Apache2.2/logs/httpd.pid overwritten -- Unclean   
  shutdown of previous Apache run?

The Windows Event log, System view shows:

  The Apache2.2 service terminated with service-specific error 1 (0x 1).

And Windows Even log, Application view shows:

  Faulting application httpd.exe, version 2.2.15.0, 
  faulting module unknown, version 0.0.0.0, 
  fault address 0x0074f1a9.


Essentially the same bug has been reported in a number of user forums, and I waited to see if anybody detected some configuration mistake, but to no avail.


Test script:
---------------
I don't know how to do a back-trace, since I find no explanation anywhere of what to do with the PHP debug-pack.

Expected result:
----------------
Apache 2.2.15 service starts.

Actual result:
--------------
Apache 2.2.15 service cannot start.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-09 09:21 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-07-09 09:21 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2010-07-09 18:00 UTC] murray at math dot umass dot edu
-Status: Feedback +Status: Open
 [2010-07-09 18:00 UTC] murray at math dot umass dot edu
Source of conflict found: additional copies of php_*.dll files in a separate Marvell MRU subdirectory of C:\Program files (from a monitor of Marvell RAID controller) which uses an embedded apache server. I uninstalled the Marvell MRU program. Now I can start Apache 2.2.15 service with apache loaded, as usual, as a PHP module with PHP 5.3.2.  Even after removing my whole PHP tree obtained from the .zip and instead using the VC6 x86 Thread Safe.msi installer.
 [2010-07-21 22:51 UTC] mgdm@php.net
-Status: Open +Status: Bogus
 [2010-07-21 22:51 UTC] mgdm@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2011-02-24 18:22 UTC] cyue at datalogics dot com
I am having the same problem. I installed Apache 2.2 and PHP 5.3.5 VC6 threaded 
version, Windows 7 64-bit system.  The Apache service can start without PHP 
installed, but after the PHP is installed, I am getting the error that the 
php5apache2_2.dll is not found error.  Even though it is inside the PHP folder.

Any suggestions?
 [2011-02-24 19:58 UTC] cyue at datalogics dot com
I figured it out by reading some other posts.  It may be Windows 7 only thing.  I 
had to manually edit the httpd.conf file under Apache to point PHPIniDir to the 
PHP location.  It seems to be working fine on another 2003 server without having 
to do this manually. 

PHPIniDir "C:/Program Files/PHP/"
 [2011-06-04 02:01 UTC] brianjameson1003 at gmail dot com
If this is a Windows 7 issue, I found a fix after much banging my head into the desk!

The person who said this was close, but it didn't work for me:

--------------------------------------------------------------------------------
I figured it out by reading some other posts.  It may be Windows 7 only thing.  I 
had to manually edit the httpd.conf file under Apache to point PHPIniDir to the 
PHP location.  It seems to be working fine on another 2003 server without having 
to do this manually. 

PHPIniDir "C:/Program Files/PHP/"

--------------------------------------------------------------------------------

Here is what did work:
1. Comment out the PHPIniDir line in the httpd.conf file.
2. Include the full path in the LoadModule line. In my case, I am using Apache2.2 and my PHP directory is C:\PHP so my entry looked like this:

LoadModule php5_module "C:/php/php5apache2_2.dll"

Once I did that, Apache fired up with no problem and if you open the Apache Monitor, you can confirm that PHP is running. At the bottom it says: Apache/2.2.19(Win32)PHP/5.2.17


Hope that helps many of you out!
 [2011-08-04 21:57 UTC] jb at newsoftwaregroup dot com
I found it to be modules in the PHP.INI file.  Take them all out and see if Apache starts, then add them back and find culprit.
 [2013-09-12 03:43 UTC] iajay at yahoo dot com
This did not solve my problem. Apache didn't start even after doing this.
1. Comment out the PHPIniDir line in the httpd.conf file.
2. Include the full path in the LoadModule line. In my case, I am using Apache2.2 and my PHP directory is C:\PHP so my entry looked like this:

LoadModule php5_module "C:/php/php5apache2_2.dll"
 I got the error " Apache server encountered an error and needs to close"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC