as5680 Posted September 6, 2010 Share Posted September 6, 2010 Hi, I am having problems getting PHP to connect to MySQL on my local server. I have PHP running fine and am able to login to MySQL through command line with no problems. Today I tried to install phpmyadmin on my local machine to test some things before putting them online, and get the "Cannot load mysql extension. Please check your PHP configuration" error message. I have searched various forums but all the fixes suggested don't seem to make a difference - it seems to me that no connection is being made at all. I have checked in php.ini and the extension directory is set correctly, and I have removed the semi-colon before "extension=php_mysql.dll". When I run a test PHP script to try connecting to MySQL I get nothing in my browser, not even an error message. Not sure what else to try so any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
mikosiko Posted September 6, 2010 Share Posted September 6, 2010 check if the extension is active using this <?php phpinfo(); ?> if is not try to restart your web server (apache?) and check that the extension_dir in your php,ini is pointing to the right directory and the php_mysql.dll is there Quote Link to comment Share on other sites More sharing options...
as5680 Posted September 7, 2010 Author Share Posted September 7, 2010 extension_dir seems to be pointing to the right directory, certainly the directory where php_mysql.dll is. I'm afraid I am still quite new to this and don't know exactly how to check for the extension in phpinfo, not sure where it would tell me. Apache has certainly been restarted several times since I tried to configure php.ini. 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.