views:

3337

answers:

7

WAMP installed fine, no problems, BUT...

When going to phpMyAdmin, I get the error from phpMyAdmin as follows:

"Cannot load mysqli extension. Please check your PHP configuration".

Also, phpMyAdmin documentation explains this error message as follows:

"To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed. Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar."

Finally, the apache_error.log file has the following PHP warnings (see the mySQL warning):

PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0 PHP Warning: Zend Platform does not support this version of PHP - please upgrade to the latest version of Zend Platform in Unknown on line 0 PHP Warning: Zend Debug Server does not support this version of PHP - please upgrade to the latest version of Zend Debug Server in Unknown on line 0 PHP Warning: gd wrapper does not support this version of PHP - please upgrade to the latest version of gd wrapper in Unknown on line 0 PHP Warning: java wrapper does not support this version of PHP - please upgrade to the latest version of java wrapper in Unknown on line 0 PHP Warning: mysql wrapper does not support this version of PHP - please upgrade to the latest version of mysql wrapper in Unknown on line 0

So, for some reason PHP is not recognizing the mysql extension.

Anyone know why? Any solution or workaround?

A: 

Hi guys, I had the same problem. I had WAMP server installed. All was working fine. Then one day I restarted my computer and it just stopped working! I tried desperately going through all help posts and doing them but nothing worked.

What they usually suggest you do is, first go to your php.ini file and make sure your 'extension_dir' is properly set. Then to make sure these two lines are not commented (remove the ; infront): extension=php_mysql.dll extension=php_mysqli.dll

Then some suggested that I download fresh copies of these two files but none worked. I also tried uninstalling everything (php/mysql/apache) and reinstalled fresh copies of WAMP server several times but with no luck.

Finally I managed to find an alternative solution. I switched to 'easyphp' (http://www.easyphp.org/). This is something very similar to WAMP. First I made backups of my sql databases so I can reload them on the new installation.

Then I installed 'easyphp' and everything seems to work fine. I reloaded my sql databases from my backup and now things are back to normal.

I hope someone suffering from a similar prob. will find this useful. If someone has really found a fix to make WAMP server work. Pls do be kind enough to post it here so many will benefit.

Vicer
A: 

First, make sure that the php.ini file is loading the mysqli extension.
If you are using WAMPServer, click on the icon in the system tray, go to PHP -> PHP Extensions and make sure it is checked. If not, go into the php.ini file and make sure that the line: extension=php_mysqli.dll is uncommented (eg, remove the ; if it exists). If that line does not exist, add it.

If this still does not work, double check that the right php.ini file is being loaded.
To do so, view your phpinfo() (Here for WAMPServer). Scroll down to the Loaded Configuration File row and see which php.ini is being loaded. Make sure it is the right file. If you're using WAMPServer, it should be (WAMP INSTALL FOLDER)\bin\apache\Apache2.2.11\bin\php.ini. By default, it is C:\wamp\bin\apache\Apache2.2.11\bin\php.ini`.

If a different php.ini file is being loaded, just rename it to something else so that PHP will try and find the file somewhere else. There should be a way to specify which on eyou want to use, but I forget exactly how to do that...

If this still doesn't work... Try messing around with phpMyAdmin's settings, or using another answer, but I'm afraid I can't help beyond this.

DeadHead
+3  A: 

I deleted the PHP in program files ad everything started working , the problem that there two installations of pHp

Tanveer
Me, too. You can check on phpinfo() which php.ini is being loaded.
porum
A: 

in wampserver go to php.ini. open the file and uncomment extension=msql.dll by removing semicolon(;) for respective operating sytem.

Arti Lamba
A: 

Just wanted to chime in on this one. Using Wamp Server 2.0, and using Zend Studio with Zend debugger for development. I wasn't able as of yet(will get back to it at some point) to get the zend debugger working with php 5.3, so in wamp I loaded an earlier php version, 5.2.11. I was getting the same error when acessing php my admin. What I had to do was change the php.ini file value for extension_dir = "c:/wamp/bin/php/php5.2.11/ext/" to match the version of php I was using. after that it was all good.

Kelly
A: 

***I deleted the PHP in program files ad everything started working , the problem that there two installations of pHp link|flag

answered Oct 17 at 4:53 Tanveer 21●*

thanks a lot ..your answer helped me and my wamp server started working :) :)

farah
A: 

also setup the mysql password:

SET PASSWORD FOR root@localhost=PASSWORD('your_password');

and the phpmyadmin mysql password in config.inc.php:

$cfg['Servers'][$i]['password'] = 'your_password';

mr.m