Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

PHP not loading mysql modules

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner

View previous topic :: View next topic  
Author Message

Joined: 03 May 2006
Posts: 37
Location: Timisoara (Romania)

PostPosted: Thu 10 May '07 9:55    Post subject: PHP not loading mysql modules Reply with quote

Hello! I have installed MySQL 5.0.41 and I am using PHP 5.2.2. After installing the latest version of MySQL, PHP stopped loading both the normal and the improved MySQL extensions. Before this I had MySQL 5.0.37. Could it be a problem with libmysql.dll? Can anyone help me?
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6519
Location: Germany, Next to Hamburg

PostPosted: Thu 10 May '07 11:50    Post subject: Reply with quote

Yes, the libmysql can be a problem, don't must be a problem.
Use the search function and for all libmysql.dll delete all but not the one in mysql\bin and copy it to apache\bin folder.

Do you log your PHP errors?


in php.ini

error_log = C:/php/phperror.log

any error in that?
Back to top

Joined: 03 May 2006
Posts: 37
Location: Timisoara (Romania)

PostPosted: Thu 10 May '07 12:25    Post subject: Reply with quote

Yes, I'm doing that, and despite the fact that I tried both by setting the PHPIniDir to the appropiate directory or by copying php5ts.dll to C:\WINDOWS\system32 and php.ini to C:\WINDOWS, I still get this error:

[10-May-2007 10:42:51] PHP Warning:  PHP Startup: Unable to load dynamic library 'D:\Programs\PHP\ext\php_mysqli.dll' - Invalid access to memory location.

 in Unknown on line 0

I get the same error for php_mysql.dll.
Back to top

Joined: 17 Dec 2005
Posts: 610
Location: Milford, MA, USA

PostPosted: Thu 10 May '07 17:19    Post subject: Reply with quote

That appears to be a bug in the MySQL 5.0.41 client library, libmysql.dll. I get the same error on Windows 2000.

You can use an earlier version of libmysql.dll (e.g. 5.0.37) to access a 5.0.41 MySQL server with no problems.

FYI - Building the client library from source code using Visual C++ 2005 and defining the symbol USE_TLS
allows the 5.0.41 library startup functions to succeed. The USE_TLS symbol was defined in Windows versions of MySQL prior to 5.0.41.

If you really want to use a 5.0.41 client library, this rebuilt library is at http://www.tomdonovan.net/download/libmysql_5.0.41_Win32.zip.
I haven't tested it very much - so please test carefully if you use it.

I'll check some more, and I will log a bug with MySQL if I can learn why this symbol is still necessary for Windows clients.

Edit: I logged MySQL Bug 28358 for this problem.

Back to top

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1