|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51185 Apache won't start after PHP 5.3.1 is installed
Submitted: 2010-03-02 22:41 UTC Modified: 2010-07-21 21:30 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: randy at thehiringsurvey dot com Assigned:
Status: Not a bug Package: Windows Installer
PHP Version: 5.3.1 OS: Windows 7 (x64)
Private report: No CVE-ID: None
 [2010-03-02 22:41 UTC] randy at thehiringsurvey dot com
This is a development desktop computer, not a production server.
Windows 7 Home Premium 64-bit, fully patched
Avast Antivirus, Home edition, fully patched
Apache 2.2 installed via the full installer (apache_2.2.14-win32-x86-openssl-0.9.8k.msi)
PHP 5.3.1 installed via the full installer (php-5.3.1-Win32-VC6-x86.msi)
MySQL 5.1 is also installed and the service started, but I have not even attempted to connect yet, because Apache can't run.  (mysql-5.1.44-winx64.msi)

I had never downloaded any other/previous versions of Apache or PHP.  All of the files I am dealing with came from these installers.

Apache starts and runs fine until I install PHP and reboot Windows (PHP doesn't seem to work after the install until I reboot.)
After I install PHP and reboot, Apache refuses to start.  The Windows event log describes the failure:
Event 1000
Description: Faulting application name: httpd.exe, version:, time stamp: 0x4ac181d6
Faulting module name: php5ts.dll, version:, time stamp: 0x4b051b35
Exception code: 0xc0000005
Fault offset: 0x000e618c
Faulting process id: 0x10f4
Faulting application start time: 0x01caba41084e6e4e
Faulting application path: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe
Faulting module path: C:\Program Files (x86)\PHP\php5ts.dll
Report Id: 46094170-2634-11df-80a6-00241d23de59

Apache's error log is not updated when this occurs.  I'm guessing that is because the failure is before the logging is running.

I found a few support threads here and elsewhere, where people cold generate similar problems by manually installing php5apache2_2.dll instead of php5apache2.dll (or vice versa).  I'm on Apache 2.2 and using the correct php5apache2_2.dll, so that doesn't seem to be the problem.

This is what was appended to the httpd.conf file by the PHP installer:
PHPIniDir "C:/Program Files (x86)/PHP/"
LoadModule php5_module "C:/Program Files (x86)/PHP/php5apache2_2.dll"

The files php5apache2_2.dll and php5ts.dll are both present in the PHPIniDir, and seem to have completely normal security settings.  Apache is running as System and System has full control of both files.

I checked that the PHP Path entry and the PHPRC environment variable are set correctly.  They are.

Uninstalling, deleting, redownloading, and reinstalling the same version of PHP results in the same error.

Uninstalling, deleting, downloading PHP 5.2.13 , and installing that version of PHP works just fine (php-5.2.13-win32-installer.msi).  During the PHP 5.2.13 install I selected Apache 2.2 for the web server.  I made no other configuration changes.  It just worked.

I'm running PHP 5.2.13 now.  So I'll wait and retry 5.3.x later...

Many thanks,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-02 23:17 UTC]
-Package: Apache2 related +Package: Windows Installer
 [2010-03-03 09:26 UTC] c dot fior at bss-gt dot com
I had the same problem with OE Windows Server 2003 ... I had to downgrade to previous release
 [2010-03-04 11:29 UTC]
-Status: Open +Status: Feedback
 [2010-03-04 11:29 UTC]
Which extension(s) are enabled in the php.ini?

It could be due to some extensions requiring external DLLs (oracle for example) or the PHP directory not being in your PATH.

Try to call php from the command line as well, with or without using the system php.ini (be sure that you have removed or updated the 5.2's php.ini, especially the extension_dir setting).

php.exe -n -i no php.ini loaded
php.exe -i with system php.ini
 [2010-03-04 15:43 UTC] randy at thehiringsurvey dot com
pajoye asked me which extensions were enabled.  I'm sorry but because I have uninstalled 5.3.1 and installed 5.2.13 I can no longer say for certain.  I do not have a copy of the php.ini from the 5.3.1 installation.  I checked my trash, and it's gone.

When I installed 5.3.1 I did go through the custom setup and to select extensions.  There were a few extensions that I knew I needed.  I think that they (PEAR and MySQL) were both selected by default, so I just took the defaults.
 [2010-03-04 16:00 UTC] c dot fior at bss-gt dot com
This were the installed extension, but now I have gone back to 5.2.12 because it is a production server

 [2010-03-04 16:49 UTC]
interbase is not available in 5.3, so I think you were using the old php.ini or messing extensions.
 [2010-03-16 00:36 UTC] cunobatis at bluewin dot ch
I just had the same problem as randy and adding the path where php resides to my PATH varible did the trick indeed!
 [2010-03-16 00:41 UTC]
-Status: Feedback +Status: Bogus
 [2010-03-16 00:41 UTC]
@cunobatis at bluewin dot ch

that's a configuration problem. Adding the PHP directory to your PATH is a required step when you configure PHP with Apache.
 [2010-03-16 00:48 UTC] randy at thehiringsurvey dot com
Two points:
1. I did not have to manually define any PATH variables when I installed PHP 5.2.13 after I had uninstalled 5.3.1.  So the 5.2.13 installer is working where the 5.3.1 failed.
2. After I got PHP 5.2.13 running I installed PEAR.  I ran into a non-fatal installation problem in PEAR as well.  I found out that Windows 7 is case sensitive when referring to PATHs.  PEAR was creating it's PATH variable with the directory in all upper, but the actual folder was all lower.  That worked on earlier Windows, but not on 7.  I don't know which Windows version they made that change in.  But once I edited PEAR's PATH variables to match the actual directory case the non-fatal error was resolved.

I suspect that PHP 5.3.1's installer is creating a path with the wrong case, based upon the assumption that Windows doesn't care.  Can't prove it without uninstalling PHP, and I can't do that right now.
 [2010-07-21 21:26 UTC] smacdav at gmail dot com
It's not the path variable; it's the dll file. I had exactly the same issue. I made sure my path had the right case and tried starting Apache: no dice. I had backed up my old php (from PHP 5.2.11) folder before installing PHP 5.3, so I tried copying php5apache2_2.dll from the backed up folder into the installation folder for PHP 5.3. Bingo! Apache started up and seems to be running fine. (Haven't tested and PHP 5.3 only features yet, though.)
 [2010-07-21 21:30 UTC]
@smacdav at gmail dot com

Your install is a mess then. php 5.2's sapi dll cannot work nor load with 5.3.

Please ask php-setup or php-windows mailing for further supports (to any other reporters looking for help regarding the problem described here).
 [2010-07-21 21:36 UTC] smacdav at gmail dot com
You're right, of course. I was just realizing the issue and coming back to comment. That was silly of me. Sorry.
 [2011-08-25 06:24 UTC] tony dot bedford at live dot co dot uk
I had the same problem with 5.3.5 on Windows 7 with Apache 2.2. Here's how I fixed 
it. When reinstalling Apache (as it failed to start after installing PHP) I got 
the error 'failed to load php5apache2_2.dll'. That of course was a 
clue. Checking httpd.conf I saw that the PHP installer had not set the PHP ini 
directory correctly (just empty quotes) and the path to the DLL was not added. I 
manually fixed these (I installed PHP to C:\PHP) and everything worked fine.

By the way, based on comments above and elsewhere, I checked the path was set with 
correct case. Everything was in order so that wasn't the problem in this case. 
Hope this helps.
 [2014-06-17 19:02 UTC] rp_dicky_33 at yahoo dot com
I also ran into a similar error while trying to install PHP 5.2.17 on Windows XP.  Apache would crash after trying to restart it.

To fix Apache from crashing (and after reading pajoye's comment on some extensions requiring external DLLs), I uninstalled/removed PHP (using the PHP windows setup program), then re-installed PHP, but this time selecting only a handful of extensions to be installed (i.e. curl, dba, mbstring, mcrypt, mhash, mysql, mysqli, openssl) as opposed to opting for all extensions to be installed, like I did the first time.  

After making appropriate changes to Apache's config file "httpd.conf"

 PHPIniDir "C:/Program Files/PHP/"
 LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"

and verifying system variables and Path were in order, I restarted Apache and this time it worked!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 11:01:27 2024 UTC