0

I have just installed MySQL on windows server 2003 32-bit. I have PHP 5.2.6.

When doing in cmd: php -m to get the modules I have this error:

"PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'libmySQL.dll"
in Unknown on line 0"

the dll in located in:

"C:\Program Files\PHP\ext\libmySQL"

My php.ini looks like this:

extension=libmySQL.dll

I tried to download again the DLL and restart the server, still the same error. I have this DLL in system32 as well, can you please help me?

7
  • what is your extension_dir value Commented Oct 28, 2013 at 9:35
  • extension_dir ="C:\Program Files\PHP\ext" Commented Oct 28, 2013 at 9:40
  • is the complete path like C:\Program Files\PHP\ext\libmySQL.dll or C:\Program Files\PHP\ext\libmySQL\libmySQL.dll ? Commented Oct 28, 2013 at 9:43
  • the dll is located at: "C:\Program Files\PHP\ext" the path in the php.ini is: C:\Program Files\PHP\ext Commented Oct 28, 2013 at 9:44
  • Make sure you have downloaded the 32-bit version of the dll and not the 64-bit one. Commented Oct 28, 2013 at 9:45

1 Answer 1

3

All builtin PHP extension files start with php_..., not lib. Particularly, the legacy deprecated MySQL extension is loaded this way:

extension=php_mysql.dll

I'd say you're attempting to load something that's not a PHP extension at all (it looks like the MySQL library used by MySQL clients like Workbench or HeidiSQL).

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

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.