eddy556 Posted August 7, 2007 Share Posted August 7, 2007 Okay I've had this problem for a while and I have done absolutely everything I can find on the internet about this. I have PHP version 5.2.3 and MySQL Server 5.0 both installed and working fully independently of each other...however I just cannot get them to work together. I have downloaded both libmysql.dll and php_mysql.dll and both are located in the folder C:\Program Files\PHP. I have also updated php.ini correctly (i think anyway) but just to check here are the affected lines: extension_dir = "C:/Program Files/PHP/" extension=php_mysql.dll I have also changed the PATH variable in the windows environment variables so at the end I have: C:\Program Files\PHP\ with a semi-colon before the previous entry...and restarted afterwards. I can't figure out the problem at all...there is no mention on MySQL when I call the function phpinfo() Hopefully one of you know whats going on! I'm sure there's a simple solution :-) Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 7, 2007 Share Posted August 7, 2007 Is PHP reading your php.ini? Check the following two lines: Configuration File (php.ini) Path Loaded Configuration File When you run phpinfo(). One of those should be set to the full path in which php is reading your php.ini from, eg if you php.ini is in C:/Program Files/PHP/ then one either of the above lines should be set to C:/Program Files/PHP/php.ini if none of them is set the correct path then PHP is not reading your php.ini Quote Link to comment Share on other sites More sharing options...
eddy556 Posted August 9, 2007 Author Share Posted August 9, 2007 Okay this is what I have: Configuration File (php.ini) Path C:\WINDOWS Loaded Configuration File C:\Program Files\PHP\php.ini Should the path be C:\WINDOWS? I am pretty sure php.ini is being read correctly as I can turn of error reporting and the effects take place after restarting the server...but I don't understand why C:\WINDOWS is showing up? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 9, 2007 Share Posted August 9, 2007 Both lines dont need to be the same. Only one of the lines need to be pointing to the correct path in which your php.ini is located. If either lines is correct PHP is reading your php.ini Quote Link to comment Share on other sites More sharing options...
eddy556 Posted August 9, 2007 Author Share Posted August 9, 2007 Okay then so any other ideas? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 9, 2007 Share Posted August 9, 2007 Turn display_startup_errors on within the php.ini. PHP should error out if it is having trouble while loading the configuration. Quote Link to comment Share on other sites More sharing options...
eddy556 Posted August 10, 2007 Author Share Posted August 10, 2007 Okay just found this error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Program Files/PHP/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 and this is repeated twice...however I have checked and double checked that the file is in the correct place Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 10, 2007 Share Posted August 10, 2007 Okay just found this error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Program Files/PHP/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 and this is repeated twice...however I have checked and double checked that the file is in the correct place PHP requires an third party library in order for php_mysql.dll to function correctly. This external library is called libmysql.dll. Make sure this file is in the root of the PHP folder. Also delete any instance of libmysql.dll form your computer, but keep libmysql.dll in PHP and MySQL's installation directory only. Quote Link to comment Share on other sites More sharing options...
eddy556 Posted August 12, 2007 Author Share Posted August 12, 2007 Okay so here's my understanding of what I'm meant to do... I have just realised there is a file libmySQL.dll in the bin folder of my MySQL installation. Am I meant to copy this file to my PHP root directory? Previously I was using a libmysql.dll which I just downloaded off the net and its around half a MB smaller than the one in the MySQL bin folder. Also do I leave the original file in place? I have tried this and restarted the server but it has still not worked with the same error. Would it help to upload my php config file? Does the MySQL folder need a PATH variable? Thanks :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.