Jump to content


Photo

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


  • Please log in to reply
8 replies to this topic

#1 clem_c_rock

clem_c_rock
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 04 September 2006 - 08:31 PM


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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 September 2006 - 10:12 PM

Open up your php.ini and find the extension_dir directive (around line 529). Change whats in the quotes ro whats after "extension_dir =" 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.

#3 clem_c_rock

clem_c_rock
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 05 September 2006 - 03:34 PM

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.



#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 05 September 2006 - 03:47 PM

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_mysqli.dll).

Also run this in a script:
<?php phpinfo(); ?>
Does it have a mysql section anywhere in that file?

#5 clem_c_rock

clem_c_rock
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 05 September 2006 - 10:34 PM

Well, I got that error fixed by pointing the extension_dir to the correct directory.

Now I have another error which is: "Cannot load mysql exten
sion" when I go to phpMyAdmin.



#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 05 September 2006 - 10:40 PM

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.

#7 clem_c_rock

clem_c_rock
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 06 September 2006 - 02:19 PM

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

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

Any Suggestions?

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 September 2006 - 02:52 PM

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 setup the config.inc.php file correctly. Also make sure you have the latest statble release of phpMyAdmin

Also the MySQL configuration reported is fine.

#9 clem_c_rock

clem_c_rock
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 06 September 2006 - 09:52 PM

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:


'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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users