1

I'm using Apache 2.2 along with Windows 7. I just need to enable MySQL extension to work. Its okay when I'm using windows binary (.msi). But when I'm trying with .ZIP file, MySQL extension is not working. I have un-commented the extension in php.ini. But the error still presists.

Would anyone have suggestions for how to fix that?

slhck
  • 223,558
  • 70
  • 607
  • 592
  • 2
    What error? (And why are you using `mysql` anyway? It's been deprecated in favor of `mysqli` and `pdo_mysql` for years) – Billy ONeal Dec 01 '11 at 16:30
  • Did you check that the path of the extension exists? maybe you enabled it but the .dll is missing. –  Dec 01 '11 at 16:31
  • Do a phpinfo() to make sure you've edited the correct php.ini – Mark Baker Dec 01 '11 at 16:34
  • I'm trying to install wordpress. so that its needed to enable MySQL extension. @BillyONeal –  Dec 01 '11 at 16:38
  • Yup, i did called phpinfo() for that. The directory is C:\Program Files\PHP\php.ini @MarkBaker – Zareef Hasan Dec 01 '11 at 16:45
  • Yup, i have checked and rechecked the "extension_dir" for that, and the php_mysql.dll is there. @SeRPRo – Zareef Hasan Dec 01 '11 at 16:49
  • Do you have `libmysql.dll` sitting in your PHP folder? I believe that it's required for `php_mysql.dll` to work and not distributed with the php 5.3 .zip files by default. – afrazier Dec 01 '11 at 17:11
  • i did paste `libmysql.dll` in system32 folder. Timothy has solved it, `enable_dl` in php.ini was set OFF @afrazier – Zareef Hasan Dec 01 '11 at 17:33

1 Answers1

2

Probably your php.ini isn't configured correctly. Even if it is I have seen instances where I had to copy the .dll's to the same dir as the php.exe.

Definitely make sure that extension_dir is set correctly and that enable_dl = On in the .ini file, and use phpinfo() to check.

soandos
  • 24,206
  • 28
  • 102
  • 134