Strange Behavior when Loading MySQLi Extension on Win32

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello everyone:

I have come to love the ease of updating PHP, since getting used to  
using it these past few years. Recently, however, when I upgraded from  
PHP 5.1 to PHP 5.2.0 and again when moving to 5.2.1, I noticed strange  
behavior when trying to load php_mysqli.dll. I am using Apache 2.2.3  
on Windows XP Pro (32-bit). I use the php5apache2_2.dll to load PHP as  
an Apache module. The PHPIniDir directive in httpd.conf points to the  
correct directory. I also have the older php_mysql.dll extension  
loaded simultaneously, which works fine. However, in phpinfo(), MySQLi  
is nowhere to be found, and trying to use any mysqli functions or its  
class will yield an error saying that they're undefined. In php.ini,  
the extension_dir directive points to "C:\php5\ext\".

As for the environment, I have my PHP install dir in the _System_ PATH  
(it's been there for a long time): C:\php5. When I install, I just  
move new release into the php5 directory, so necessary DLLs for  
extensions do not need to be moved, and older versions can be  
overwritten for newer releases. In fact, mb_string, mcrypt, GD2, cURL,  
php_mysql, and many other extensions load just fine. However, the only  
way I can get MySQLi to load correctly is by moving libmysql.dll into  
my C:\WINDOWS\system or C:\WINDOWS\system32 folders.

I simply can't understand why the problem lies only with MySQLi. Also,  
when I restart Apache, there are no errors. The MySQLi extension  
directive in php.ini is also uncommented, by the way. :-)

This has only started to happen since my past couple upgrades, so I'm  
not sure exactly what to make of that.

Thanks for any time you have spared and/or can spare on me,

Re: Strange Behavior when Loading MySQLi Extension on Win32

Curtis wrote:
Quoted text here. Click to load it

Is it possible that your php_mysqli.dll is an older version compared
PHP and libmysql.dll?


Re: Strange Behavior when Loading MySQLi Extension on Win32

NC wrote:
Quoted text here. Click to load it

I was wondering that too, but downloaded the latest from, so  
I don't think that's the issue. If it's something weird with the way I  
have windows set up or something, I might need to ask in a windows  
newsgroup, but again, I'm just not sure what to make of it.


Site Timeline