473,480 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Strange Behavior when Loading MySQLi Extension on Win32

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
2 2590
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3320
by: stevek | last post by:
the instructions read as follows: To install the mysqli extension for PHP, use the --with-mysqli=mysql_config_path/mysql_config configuration option where mysql_config_path represents the...
0
4913
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are...
0
1133
by: John Hunter | last post by:
I have a class that uses some extension code I have written and I am trying to track down some memory leaks, which I presume to be in my extension code. The class is question is in a python...
6
2068
by: Christopher Watson | last post by:
Have been running PHP 5.1.1 successfully for quite some time as CGI in IIS 5.1 on my Windows XP Pro SP2 laptop, with MySQL Server 5.0.18 and the mysqli extension. I wanted to see if I could get...
12
4718
by: davids58 | last post by:
trying to figure out how to use a mysql database with PHP. I ran the following code: <?php // defines database connection data define('DB_HOST', 'localhost'); define('DB_USER', 'ajaxuser');...
21
7232
by: Daz | last post by:
Hi everyone. I am trying to create an extension of the mysqli class within PHP, and I am finding it quite difficult. I am fairly new to PHP classes, and decided to give them a go. Here's what I...
11
11061
by: macca | last post by:
Hi, What should I be using for general MySQL database access? I've been using the traditional mysql extension for ages, but I'm trying to update my style to a more OOP paradigm. I've used...
0
1109
by: anonymous | last post by:
I had a tough time getting PHP to connect to MySQL using mysqli on XP. The following code from the php documentation on mysqli failed to work on xp. $mysqli = new mysqli( "localhost", "user",...
3
2293
code green
by: code green | last post by:
I am still using the mysql extension rather than the mysqli. Moving to mysqli would be realively simple in my case because all mysql_ procedural calls are wrapped in a class MySqlDB(). As are...
0
7039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.