PHP5.2.8 And MySQL 5.1 Crashing Apache 2.2 On Windows?

17th January 2009

OK. I've just spent two hours trying to sort this problem out so I thought I would pass on the info.

I installed Apache and PHP and they worked fine, but every time I tried to run any MySQL commands through PHP the Apache server would simply crash.

After looking at the Event Viewer the problem appears to be from a file called php5ts.dll, but trying to do anything with this file will lead you down a blank alley.

What is happening is to do with a file called libmysql.dll. This file can be found in your PHP directory, but it is also to be found in your MySQL install directory. This is where the problem lies. When Apache asks for the libmysql.dll file it will receive the one in the MySQL directory because this included in the Windows PATH variable. This version of the libmysql.dll file causes Apache to crash.

At first I tried to add the PHP folder to the end of the PATH, but this didn't work. What you need to do is add the PHP folder BEFORE the MySQL folder.

Comments

Permalink
All I have to say is THANK YOU! I had Apache 2.0.63, Mysql 5.0 working fine on a test box. I moved to MySQL 5.1, and everything stopped working, crashing Apache. This fixed my problems.

Submitted by Brian on Mon, 04/20/2009 - 13:24

Add new comment

The content of this field is kept private and will not be shown publicly.