Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the instructions on PHP5 readme file to do a manual install on Windows and as a module on top of Apache.

I ran phpinfo() and it appeared all OK.

Then, every time I run php code calling MySQL it crashed. I just could prevent the crashes installing PHP5 as CGI.

Note that the crashes stopped just by changing Apache config from loading PHP5 as a module to running PHP5 as CGI. No PHP config changes involved.

Also noteworthy: the same PHP5 as an Apache module install steps executed on another Windows XP machine run smoothly.

share|improve this question

How to Install and Configure PHP 5 to Run with Apache on Windows has instructions on how you can run PHP 5 as an Apache Module.

If you want more specific answers, you should include error-messages from the crashing application.

share|improve this answer
As stated, I followed these instructions. But it always crashed when running php code to access MySQL. The same config on Windows XP run ok! Apache saved this error message on Windows Event Log: Faulting application httpd.exe, version, time stamp 0x493f5d44, faulting module php5ts.dll, version, time stamp 0x49dda255, exception code 0xc0000005, fault offset 0x0000ac7a, process id 0x14c8, application start time 0x01c9d9c7a429f738. – Ipsa Scientia May 27 '09 at 12:05

in httpd.conf add AddType application/x-httpd-php .php .phtml LoadModule php5_module "_YOUR_PATH_/php/php5apache2_2.dll" PHPIniDir "_YOUR_PATH_/php"

and don't any crashes, as in XP vista sp1, sp2 + apache 2 + php 5x

share|improve this answer

Check the version of MySQL you are running. Are you running 5.1 or 5.0.x? There are problems with the libraries for 5.1 under PHP 5.x. I had a problem similar to this, and my fix was to go back to the latest version of the 5.0.x code of MySQL and remove the 5.1 server.

share|improve this answer

in case you still have the problem, I did too (in XP SP3 pro 32bit) so I tried:

  • Reinstalling PHP, restarting the machine, etc.: no success.
  • Reinstalling MySQL and even installing MySQL 5.0: no success.
  • Commenting the PHP setup lines: success.

The problem seems to be with PHP after all. I'll try installing it as a CGI...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.