I just sent up WAMP and when I go to phpMyAdmin, I get this error message: Cannot load mysqli extension. Please check your PHP configuration. I've seen a couple of different possible solutions and I wanted to get some direction before I started popping the hood and pulling wires.

I'm running IIS on port 1080 and it's working great. WAMP is functioning fine, as far as I can tell in that the "localhost" comes up fine etc. But phpMyAdmin doesn't even blink. I know this isn't a new problem because I've seen a number of threads, but thus far nothing has helped including removing the ";" from the extension directory in the php.ini file.

Is there some ninja out there who can make my life a little better by solving this quandary?

As stated at page http://www.php.net/manual/en/mysql.installation.php,
<<PHP 5+
MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.

As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext

Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system.
>>
So you need to:
-uncomment the line in php.ini [you probably did... but beware: there are several php.ini in various directories, the trick is to find the rtelevant one!]
- check that php_mysql.dll and/or libmysql.dll are at the correct place
- RESTART Apache (I often forget this one!)

On my own machine (your mileage may vary):
- in C:\xampp\php, file php.ini has around line 627
;extension=php_msql.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_netools.dll
- around line 640
;extension=php_pdo_firebird.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
BUT note that your probably don't need PDO AND that there is an issue with PDO, you might need to change this dll.

Once everything is OK and apache restarted, look at your phpinfo from your XAMPP html page at http://localhost/

0

brucegustPHP DeveloperAuthor Commented: 2008-10-16

OK, I think we're making progress, or at least I understand the logic behind the problem I'm having.

First off, as far as the path is concerned, I have this under my Environment Variables:

When I go to C:\ProgramFiles\PHP\, the only file that is there php.ini. That seemed like a possible cause for concern if the system is looking there for libmysql.dll

The directory where libmysql.dll is located is C:\wamp\bin\php\php5.2.6\. Do I need to change anything in my Environment Variables? As an experiment, I did swap the seemingly incorrect address out with the accurate one, but it didn't seem to make a difference. Also, under on my phpinfo page, I have as the _SERVER["PATH"] the same address (C:\Program Files\PHP\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\) and I didn't know if that was something else that needed to be changed.

I checked for the correct location of my extension_dir and that's good to go.

As far as my list of extensions, here's what they look like on my php.ini file (I just copyed and pasted the revevant ones):

I don't know how to restart Apache, but other than that, I'm thinking it's the path that's the problem. Yet, I'm not sure what to change. Do I change the ini file or just my Environment Variables or do I change anything at all?

OK.
1 - A usual trap is that there are several php.ini on the machine! And not sure which one is the one selected!
2 - c:\programs\php is NOT the directory where your XAMP php runs from... it is presumably C:\wamp\bin\php\php5.2.6\
I would suggest that you look for a php.ini there and, if there is one, then check that the mods you meant to make... are done. (rename c:\programs\php\php.ini to php.ini-old)
3 - to stop / start Apache: look at the *.bat files ic c:\wamp
If you stop and restart you computer, apache will relaunch.

0

brucegustPHP DeveloperAuthor Commented: 2008-10-18

Renamed the old php.ini file, changed the PATH like you suggested then restarted the computer which is something I hadn't done last time and now we're running along beautifully.