1

I have been trying for a very long time to try and get mySql set up with php. The php install definitely works, and when I call phpInfo() I can see that my extension directory is being set.

When I uncomment the lines:

extension=php_mysql.dll
extension=php_mysqli.dll

I get an error when I try to restart my apache web service:

Windows could not start the Apache2.2 service on Local Computer.

Error 1067: The process terminated unexpectedly.

I am not sure what to do, I have search for answers almost everywhere and have not found a solution. Any thoughts?

Here is what I have setup:

Apache 2.2, PHP 5.2.17 (V6), MySql 5.5

extension_dir = "C:\php\ext" (I have tried just "ext" and adding trailing "\" and no luck)

I have C:/php set up as an environment variable - as I stated earlier, php is working but I just can't get MySql setup.

3 Answers 3

1

I double checked all of those, but those did not fix it.

FIXED IT: I ended up deleting my install of php and reinstalling the thread safe V6 version and it fixed my problem.

Thanks for the advice guys.

Sign up to request clarification or add additional context in comments.

1 Comment

For legacy purposes, I needed to install PHP on a Windows Server using IIS, and I was having the same issue. In my case, the opposite worked. I installed the NTS (Non-Thread Safe) version.
0

Try copying your current libmysql.dll to C:\Windows\system32 (you should find it in the php root folder). This is quite often the reason for failing php/MySql installations on Windows.

Comments

0

Make sure your Path environmental variable has C:\php\ext in it. If you add it in, reboot.

Try starting Apache from the command line to get the specific error message: httpd -k start

...and check Apache's error.log file.

Do a system search for php_mysql.dll and php_mysqli.dll. If you have either one in your C:\Windows or C:\Windows\system32 directory, delete those files.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.