0

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.

4 Answers4

1

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.

Espo
  • 366
  • 4
  • 10
  • 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 2.2.11.0, time stamp 0x493f5d44, faulting module php5ts.dll, version 5.2.9.9, time stamp 0x49dda255, exception code 0xc0000005, fault offset 0x0000ac7a, process id 0x14c8, application start time 0x01c9d9c7a429f738. –  May 27 '09 at 12:05
1

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

0

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.

netlinxman
  • 477
  • 1
  • 5
  • 10
0

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...