Why doesn't my PHP install see the MySQL extension?

Posted by Evan Padd on Server Fault See other posts from Server Fault or by Evan Padd
Published on 2012-11-22T15:15:45Z Indexed on 2012/11/22 23:01 UTC
Read the original article Hit count: 257

Filed under:
|
|
|

So I just set up PHP (Version 5.2.17), MySQL (5.5.28), and Apace (2.2) on my Windows 7 computer. I want to test a mysql connection, but the mysql extension is apparently not loaded (based on phpinfo()). Here's what I did:

  1. Changed the extension dir in the php.ini (extension_dir = ".;c:\php\ext") and uncommented the extension=php_mysql.dll line
  2. Copied libmysql.dll to the Apache's bin directory
  3. Added C:\php to the system's $PATH
  4. Restarted the server, then the computer

And it's still not working. What did I miss?

EDIT: I'm looking through phpinfo()'s outout and it says: "Server API | Apache 2.0 Handler" and I'm running 2.2. Is that a problem?

© Server Fault or respective owner

Related posts about apache2

Related posts about mysql