Jump to content

unable to load dynamic library C:\php5\php_mysql.dll


Recommended Posts


Hello,

I have screwed up something on my php.ini file on a windows server and now I am getting this error: "unable to load dynamic library C:\php5\php_mysql.dll". Now, my PHP installation actually resides here: C:\PHP\ so, obviously, it's pointing to the wrong address.

Where do I change this so the program is looking in the right directory?

Thanks,
Clem C
Link to comment
Share on other sites

Open up your php.ini and find the extension_dir directive (around line 529). Change whats in the quotes ro whats after "[i]extension_dir =[/i]" with the actual path to the extension folder.

Also if havn't added php to the Windows PATH Variable, copy a file called libmysql.dll to C:\WINDOWS folder.
Link to comment
Share on other sites

Well, I fixed the first error by setting the extensions_dir to the correct path but now I have another error when I go to phpMyAdmin: "Cannot load mysql extension".

PHP was working fine before I blew it up so I'm pretty confident that the PATH variable is set correctly.

Thanks for your time.

Link to comment
Share on other sites

Your mysql extension hasn't been loaded up correctly. Which extension did you enable the normal mysql extension (php_mysql.dll) or the MySQL Improved extenson (php_mysql[b]i[/b].dll).

Also run this in a script:
[code=php:0]<?php phpinfo(); ?>[/code]
Does it have a mysql section anywhere in that file?
Link to comment
Share on other sites

You may have fixed the path to the extension_dir but it may not have loaded up the mysql extension properly. Otherwise phpMyAdmin wouldnt report "Cannot load mysql extension".

That why I said to check that there is a mysql section present when running the phpinfo function.
Link to comment
Share on other sites

Yeah there is - and it looks a bit problematic to me:

[code]
Active Persistent Links 0
Active Links 0
Client API version 4.1.7

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
[/code]

Any Suggestions?
Link to comment
Share on other sites

Okay so the cause is with phpMyAdmin now then make sure you have extracted the contents of the phpMyAdmin contents properly and that you have [url=http://www.phpmyadmin.net/documentation/#setup]setup the config.inc.php[/url] file correctly. Also make sure you have the latest statble release of [url=http://www.phpmyadmin.net]phpMyAdmin[/url]

Also the MySQL configuration reported is fine.
Link to comment
Share on other sites

Ok - got it!!

Actually mysql and PHP were running fine after I changed the extension_dir to the correct directory.

The Problem after that was w/ phpMyAdmin and it's configuration.

Here's what I did to fix that:

[code]

'host' from localhost to the machine host name 'extension' to 'mysqli' 'user' to a user who has access to MySQL, i.e. can log onto MySQL on the server 'password' to the password of the user
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.