View Full Version : phpMyAdmin wont work.
I have been running an Apache HTTP server for months now along with PHP / MySQL and phpMyAdmin. Yesterday I went to try and access MySQL with phpMyAdmin and I get this error.
Cannot load mysql extension. Please check your PHP configuration. - Documentation
Naturaly I am confused because I have had the same setup for months without ever changing my php.ini file. Never the less I went to try and re-enable mysql exstention in PHP but found it already was. I have since then reinstalled from the ground up Apache 2.2.11 , PHP 5.2.9, MySQL 5.1.3 and phpMyAdmin 3.1.3.
Web Server is installed correctly and works.
PHP Installed / tested and mysql exstention or rather extension=php_mssql.dll is enabled.
MySQL installed and tested on DOS prompt.
phpMyAdmin installed, but still wont come up and still throws the above error at me when going to http://localhost/phpmyadmin/index.php
Web server and machine has been rested upon each installation of the above.
Anyone have a clue what might of went wrong here?
03-01-2009, 11:47 PM
Is the php_mssql.dll a typeo? I assume you mean php_mysql.dll.
Anyway, have you configured you're phpmyadmin client? You need to alter the config.inc.php to match you're host, authentication methods, connection types, sockets and or ports. If you did a standard apache, php, mysql install, these won't be configured in the phpmyadmin.
Um nope thats not a typo, seems my copy of PHP didnt come with a php_mysql.dll.
C:\PHP\ext\ finds no php_mysql.dll
I used the PHP installer instead of the zip file on this last install. That's weird, I guess I will download the zip file and place the php_mysql.dll in my ext folder and see what happens.
03-02-2009, 12:11 AM
Definitely. The source is a much better option, but the zip will contain more of what you need (the source includes the .so files and .c files). I find the installers are far to limited.
I must have misinterpreted you're original post, I had thought that you said you've used the mysql in you're pages already, which is why I assumed you meant php_mysql.dll.
Ok well, I did some stabbing in the dark and ditched the PHP installer version and just replaced everything that was in C:\PHP\ folder with a fresh download of php in zip format from php.net.
Once I did that I opened the php.ini file and turned on the extension for php_mysql.dll again along with the php_mcrypt.dll and reset the server.
I then grabbed the php_mcrypt.dll and php_mysql.dll an copied them out of the ext folder and into the root directory of my C:\PHP\ folder.
Then in my php root folder I grabed php_mysql.dll, php_mcrypt.dll and libmysql.dll an copied them to my C:\WINDOWS\system32\ folder and reset the server.
Vola!! Works again!
The last part is a bit confusing to me because I configured my php extensions to be located in the C:\PHP\ext\ folder not C:\PHP\ but oh well.
The last part of copying files to my system23 folder I found on some back page of Google search and figured I had tried everything else why not.
I am bookmarking this page from now on in case I run into this again.
03-02-2009, 12:24 AM
NP, glad it worked.
BTW, the reason you need to copy the file is because C:\Windows\System32 is included in you're system path, while C:\PHP\ext is not. You can add this into you're path by command line or gui (I'll give you the gui): Start > right click My Computer > properties > advanced > environment variables > scroll to 'Path' > click edit > and in variable value go to the very end and add '; C:\PHP\ext', making sure you have the semi-colon to terminate the current one.
Adding you're paths to the system has the advantage of letting you configure you're extensions correctly at run time, with different versions of PHP on you're local host. Otherwise you'd need to copy these resource extensions to a pathed directory every time you make the switch. What a pain.
Hope that helps too!
Oh crap you are right, like always ;)
I did forget to add the \ext\ to my environment path.
Oh well lesson learned.
Thanks again Fou-Lu.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.