• 10
• 12
• 12
• 14
• 17

[web] Cannot load MySQL Extension in PHP

This topic is 3959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I receive an error like below on startup : But php_mysql.dll file actually is in C:\Prog\SERVER\PHP\ext folder in my computer. How can I change this incorrect setting?

Share on other sites
Don't use an absolute path when loading the extensions. Let it find them in its extensions directory.

You must only use extensions shipped with that build of PHP (Or built with it if you built it yourself). PHP's extensions ABI is not compatible between different builds (even the same version).

Mark

Share on other sites
Quote:
 Original post by markrDon't use an absolute path when loading the extensions. Let it find them in its extensions directory.

I didn't change any path setting. That's what I am asking, how to "change" it. I only included "bin" directory of MySQL into Path variable.

This error message started to pop up after I removed the semicolon at the beginning of the "extension=php_mysql.dll" line in PHP.ini like below :
...;extension=php_java.dll;extension=php_ldap.dll;extension=php_mcrypt.dll;extension=php_mhash.dll;extension=php_mime_magic.dll;extension=php_ming.dll;extension=php_mssql.dll;extension=php_msql.dllextension=php_mysql.dll;extension=php_oci8.dll;extension=php_openssl.dll;extension=php_oracle.dll;extension=php_pdf.dll;extension=php_pgsql.dll;extension=php_shmop.dll;extension=php_snmp.dll;extension=php_sockets.dll;extension=php_sybase_ct.dll...

Or you mean, you suggest me to use something like this? :
extension=C:\Porg\SERVER\PHP\ext\php_mysql.dll

Share on other sites
This time it gave the following error :

Now what?!

Share on other sites
Put the line:
extension_dir = "C:\Prog\SERVER\PHP\ext"
somewhere before the list of extensions. Then remove the path from the extension variable as before, so that it reads:
extension=php_mysql.dll

Share on other sites
Quote:
 Original post by DaBonoPut the line:extension_dir = "C:\Prog\SERVER\PHP\ext"somewhere before the list of extensions. Then remove the path from the extension variable as before, so that it reads:extension=php_mysql.dll
It worked.

But there's a new error now...

I don't know what to do. I'm totally stuck. I use the original library files which came with the installation pack. MySQL is working without any problem from the command line. "bin" directories are included into path. Copied libmysql.dll to c:\windows\system.

What's could be wrong with it?

[Edited by - Battousai on June 24, 2007 7:04:31 AM]