PHP Extensions do not load on fresh WAMP installation

So, you just installed WampServer on your Windows PC but the smile went away from your face as soon as you tried to use mysql. PhpMyAdmin reports that it “cannot load mysqli extension” (or “cannot load mysql extension”), or your mysql application is not working any more, and you can not load and use any PHP Extension.

One possible cause for this, is that an previous installation of PHP existed in your computer, and Apache gets confused and loads the wrong php configuration file. Be aware that although you may have uninstalled PHP (from “Add/Remove programs”), the PHP’s configuration file (php.ini) may still reside in your disk.

To solve the problem do the following. First make sure that the WAMP icon is green (which means that all services are running). Then click on the icon and select Localhost. Go to the Tools section and click on “phpinfo()”. In the new page use your browser’s search dialog (Ctrl-F) and look for “Loaded Configuration File”. You should see something like this:

php2.jpg

If the path does not start with “C:/wamp/…”, then this is a good sign, it means that probably the wrong php.ini file is loaded, and this is easy to fix. Just make sure to delete the php.ini file from the location mentioned in the php info page, then go to the WAMP icon and “restart all services”.

Then refresh the php info page and repeat the search to see which php.ini file is loaded this time. Now you should be able to see the correct one, the one from the C:/WAMP folder:

php3.jpg

Now all PHP extensions should be able to properly load and mysql should be working again.Good luck!

This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to PHP Extensions do not load on fresh WAMP installation

  1. bappa says:

    thanks you save my huge time. I couldn’t figured out how to do.

  2. Christian says:

    Thanks man your solution works!!

  3. Krishna says:

    You’re THE man

  4. Jibreel says:

    WOW! You are amazing man. God bless you :D

  5. kavya says:

    Thank you so much.God bless you

  6. Mohammad Taleb says:

    Try run the WAMP as Administrators

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>