php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24621 Unable to load php_mysql.dll - The specified procedure could not be found
Submitted: 2003-07-12 12:44 UTC Modified: 2004-06-22 19:49 UTC
From: eric at cosky dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5CVS-2003-07-12 (dev) OS: Windows XP SP 1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: eric at cosky dot com
New email:
PHP Version: OS:

 

 [2003-07-12 12:44 UTC] eric at cosky dot com
Description:
------------
Using PHP snapshot file from today: php5-win32-200307121430.zip

PHP appears to be installed and working, except when I tried to use phpMyAdmin with it where phpMyAdmin started saying that mysql support wasn't enabled. Looking into it further, php_info() does not show any mysql extensions enabled. I haven't seen it clearly stated that mysql needs to be explicitly loaded now in php version 5.0 but it has been implied in a couple places so I think the thing to do was add the following line to php.ini:

extension=php_mysql.dll


When starting php, this dialog box comes up:

"Unknown(): Unable to load dynamic library 'C:\php\extensions\php_mysql.dll' - The specified procedure could not be found"

This seems like it is what I need to be doing, and the result seems possibly due to a bug.
Thanks for any info,
Eric Cosky


Reproduce code:
---------------
<?php php_info(); ?>

Expected result:
----------------
I expect to see mysql extensions described along with everything else.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-12 13:22 UTC] philip@php.net
Be sure to also copy libmySQL.dll to the appropriate location (like you do with every other DLL in the dlls/ folder).
 [2003-07-12 16:22 UTC] eric at cosky dot com
Thanks for the quick suggestion!

That wasn't quite the problem, but close enough to give me a clue for what to look for. After I verified the DLL was in fact being loaded, I was able to determine that the DLL being loaded wasn't the correct version - I had a DLL from a previous version of PHP lingering in my windows/system32 folder that was getting found in the search path before the current version.

Once again I am reminded of why I should never copy DLLs to the windows directory and instead just update global path search variables so I don't have old versions lurking about like this.

Thanks again,
Eric Cosky
 [2004-03-23 14:27 UTC] gerrykwan at netvigator dot com
Could you please explain the solution a little bit more?
I cannot figure out it, where should the libmySQL.dll be placed?
 [2004-06-19 05:32 UTC] mike at mcmahon dot com
Yes, please explain further, i am having this same problem which is not good because now i cant connect to my SQL databases which i need for registration procedures and such.  Im a bit confused and so far this is the closest ive seen to an actuall fix.
 [2004-06-22 19:49 UTC] eric at cosky dot com
Basically this was the problem: I had two copies of the DLL on my system: The one I should have been using, and one old & unusable one sitting in my c:\windows\system32 folder. Everything seemed OK because it was able to sort of work, but in fact it was using the wrong DLL. The fix was to eliminate the duplicate DLL, and adjust my system path (ie My Computer->Properties->Advanced->Environment Variables->System Variables where there is a Path Entry; simply add ";c:\mysql" or wherever you keep your DLL to the end of the existing path). Adjusting the system path let me avoid copying the DLL into the system folder which is what I did the first time and - since I had forgotten about it - was ultimately responsible for the problem in the first place - that is, having an obsolete DLL being used instead of the current one simply because it was in the system folder. It's hard to keep track of versions of stuff when they get copied into the system folder; you're much better off to just adjust paths so that when you update whatever apps you have you don't have to muck about inside c:\windows\* looking for & removing obsolete stuff.

cheers,
Eric Cosky
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC