php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42757 Mysql doesn't load php_mysql.dll
Submitted: 2007-09-25 12:17 UTC Modified: 2007-10-04 01:00 UTC
Votes:7
Avg. Score:4.0 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:4 (66.7%)
From: nektarin at gmail dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.2.4 OS: Win XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-09-25 12:17 UTC] nektarin at gmail dot com
Description:
------------
I get "Fatal error: Call to undefined function mysql_connect()" when 
using php 5.2.4 with the distributed php_mysql.dll. 

When I change to the 
php_mysql.dll from PHP 5.2.2 it works perfect. Ie. Everything is php 
5.2.4 except that I am using the php_mysql.dll from PHP 5.2.2

Reproduce code:
---------------
$db = mysql_connect("localhost","root","");

Actual result:
--------------
Fatal error: Call to undefined function mysql_connect()






Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-25 14:58 UTC] nektarin at gmail dot com
Still doesn't work with latest release (5.2.5-dev). It has the same 
symptoms; the php_mysql.dll does not load. phpinfo() has no information 
on mysql except the one in my PATH string...

Again, if I copy the php_mysql.dll from the PHP 5.2.2 release to the 
/ext folder of the PHP 5.2.5-dev installation, everything works like a 
charm.
 [2007-09-25 21:15 UTC] jani@php.net
And you have replaced the existing dlls with the ones that come with the snapshot package?
 [2007-09-26 22:30 UTC] raiko at akubi dot de
The same bug occured when I upgraded from 5.2.2 to 5.2.4 earlier.

The error message I got in the error.log was:

---
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Server\\php\\ext\\php_mysql.dll' - Die angegebene Prozedur wurde nicht gefunden.\r\n in Unknown on line 0
---

Using the DLL from the snapshot link that was posted did not fix it.

Replacing the DLL with the 5.2.2 version fixed it, the server starts normally and all MySQL functions work properly.
 [2007-09-27 00:06 UTC] scottmac@php.net
From your phpinfo page what does "Client API version" for MySQL show?

The MySQL extension for PHP is compiled against 5.0.45, if you have an older libmysql.dll in your path then it will try to use that.


 [2007-09-27 04:32 UTC] raiko at akubi dot de
>From your phpinfo page what does "Client API version" for MySQL show?
>
>The MySQL extension for PHP is compiled against 5.0.45, if you have an
>older libmysql.dll in your path then it will try to use that.

Thanks for the hint, you were right.

Apparently, there was an old version of libmysql.dll left in the system32 directory (ver. 4.1.x). After replacing it with the an up-to-date version everything works fine with the 5.2.5 php_mysql.dll .
 [2007-10-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-04-24 15:36 UTC] abang_tukang_sayur at yahoo dot com
same problem occured when i upgrade my PHP 5.2.1 into 5.2.5 i try to use php_mysql.dll from the older PHP 5.2.1 but get this message when i tried to use mysql_connect() function:

bad handshake.

so is there any suggestion to my problem? it's very frustrating. thx b4.
 [2009-02-12 16:28 UTC] jcanto at megamedia dot com dot mx
Just change the DLL order in your php.ini, put php_mysql.dll before any other database.dll (ex. before php_mssql.dll).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 13:01:29 2024 UTC