By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,634 Members | 1,898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,634 IT Pros & Developers. It's quick & easy.

Strange Behavior when Loading MySQLi Extension on Win32

P: n/a
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,
Curtis
Feb 12 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
NC

Curtis wrote:
>
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\".
Is it possible that your php_mysqli.dll is an older version compared
to
PHP and libmysql.dll?

Cheers,
NC

Feb 13 '07 #2

P: n/a
NC wrote:
Curtis wrote:
>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\".

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

Cheers,
NC
I was wondering that too, but downloaded the latest from mysql.com, 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.

Curtis
Feb 13 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.