473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MySQLi Problem with PHP 5.2.0

Hello everyone:

Recently, I decided to upgrade to PHP 5.2.0. I have C:\php5 in the
Windows XP PATH, so upgrading is quite painless; just unzip new
release, and restart Apache! Usually it goes off without a hitch, but I
noticed that phpMyAdmin was not able to utilize the MySQLi library
(which was working with my last 5.1.x release). As I was looking
through php_info(), I noticed that MySQLi didn't even load. However,
when I restarted Apache after installing and setting up php.ini, there
was NO error displayed, nor logged. Actually, I do get an error in the
actual PHP code during runtime, which informs me that the mysqli class
doesn't exist. Neither does the procedural forms of MySQLi.

Some information: I run Apache 2.0.54 on Windows XP Pro. Last night, I
upgraded to MySQL 5.0.27, in an attempt to see if it would improve the
situation (previously, I ran on 4.1.x).

php.net doesn't seem to make any special note about installing for
5.2.0 (with the exception of Apache 2.2.x), so I'm not even sure how to
go about troubleshooting, since I don't even have an error to go by.

Other modules that load are: CURL, mbstring, mcrypt, mysql (standard
mysql), and xsl. php_mysqli.dll was packed with my install, and is
located in the same directory as the above modules which load.

If anyone can point me in the right direction, I would be very
grateful.

Thanks,
Curtis

Dec 10 '06 #1
2 2737
On 10 Dec 2006 02:39:42 -0800, "Curtis" <dy****@gmail.comwrote:
>Recently, I decided to upgrade to PHP 5.2.0. I have C:\php5 in the
Windows XP PATH, so upgrading is quite painless; just unzip new
release, and restart Apache! Usually it goes off without a hitch, but I
noticed that phpMyAdmin was not able to utilize the MySQLi library
(which was working with my last 5.1.x release). As I was looking
through php_info(), I noticed that MySQLi didn't even load. However,
when I restarted Apache after installing and setting up php.ini, there
was NO error displayed, nor logged. Actually, I do get an error in the
actual PHP code during runtime, which informs me that the mysqli class
doesn't exist. Neither does the procedural forms of MySQLi.

Some information: I run Apache 2.0.54 on Windows XP Pro. Last night, I
upgraded to MySQL 5.0.27, in an attempt to see if it would improve the
situation (previously, I ran on 4.1.x).

php.net doesn't seem to make any special note about installing for
5.2.0 (with the exception of Apache 2.2.x), so I'm not even sure how to
go about troubleshooting, since I don't even have an error to go by.

Other modules that load are: CURL, mbstring, mcrypt, mysql (standard
mysql), and xsl. php_mysqli.dll was packed with my install, and is
located in the same directory as the above modules which load.

If anyone can point me in the right direction, I would be very
grateful.
Some places to start that often sort this sort of thing out:

Try the command-line version of PHP. Start off with just "php -v" - you may
see some errors here which could shine some light on the situation.

Download Dependency Walker, and load php_mysqli.dll into it. This may
highlight missing dependencies that cause it to fail to load. (You can
_usually_ ignore delay-load dependency modules, if it complains about those).
You can see which libmysql.dll it's picking up as well.

The other factor tends to be that the webserver runs under a different
environment to your user; both in environment variables and filesystem
permissions, so check they're consistent and that the relevant DLLs are
accessible to whatever user Apache is running as.

For what it's worth, both the mysql and mysqli extensions load fine here on
PHP 5.2.0, Apache, Windows XP, MySQL 5.0.22 so it's not fundamentally broken in
5.2.0 as far as I can see.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Dec 10 '06 #2
Andy Hassall wrote:
On 10 Dec 2006 02:39:42 -0800, "Curtis" <dy****@gmail.comwrote:
Recently, I decided to upgrade to PHP 5.2.0. I have C:\php5 in the
Windows XP PATH, so upgrading is quite painless; just unzip new
release, and restart Apache! Usually it goes off without a hitch, but I
noticed that phpMyAdmin was not able to utilize the MySQLi library
(which was working with my last 5.1.x release). As I was looking
through php_info(), I noticed that MySQLi didn't even load. However,
when I restarted Apache after installing and setting up php.ini, there
was NO error displayed, nor logged. Actually, I do get an error in the
actual PHP code during runtime, which informs me that the mysqli class
doesn't exist. Neither does the procedural forms of MySQLi.

Some information: I run Apache 2.0.54 on Windows XP Pro. Last night, I
upgraded to MySQL 5.0.27, in an attempt to see if it would improve the
situation (previously, I ran on 4.1.x).

php.net doesn't seem to make any special note about installing for
5.2.0 (with the exception of Apache 2.2.x), so I'm not even sure how to
go about troubleshooting, since I don't even have an error to go by.

Other modules that load are: CURL, mbstring, mcrypt, mysql (standard
mysql), and xsl. php_mysqli.dll was packed with my install, and is
located in the same directory as the above modules which load.

If anyone can point me in the right direction, I would be very
grateful.

Some places to start that often sort this sort of thing out:

Try the command-line version of PHP. Start off with just "php -v" - you may
see some errors here which could shine some light on the situation.

Download Dependency Walker, and load php_mysqli.dll into it. This may
highlight missing dependencies that cause it to fail to load. (You can
_usually_ ignore delay-load dependency modules, if it complains about those).
You can see which libmysql.dll it's picking up as well.

The other factor tends to be that the webserver runs under a different
environment to your user; both in environment variables and filesystem
permissions, so check they're consistent and that the relevant DLLs are
accessible to whatever user Apache is running as.

For what it's worth, both the mysql and mysqli extensions load fine here on
PHP 5.2.0, Apache, Windows XP, MySQL 5.0.22 so it's not fundamentally broken in
5.2.0 as far as I can see.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Hello Andy:

Thanks for the reply - very helpful. When I read your information about
how the environment variable could be a problem, I decided to check
that first, and my friend also suggested to put libmysql.dll in my
system dir, which I did. After restarting apache, I went to my
php_info, and lo and behold, mysqli info right before mine own eyes!

I'm glad it works, but C:\php5 is in the System PATH variable, so I
figured that means the directory would be available to all users' Path.
However, I have been noticing some strange behavior in that I'm having
trouble running PHP and Perl scripts from the command line (but that's
a different issue, so I won't go into that here).

Thanks again, at least I know where the problem is at.

Curtis

Dec 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: yzzzzz | last post by:
Hi, I am compiling PHP 5.0.2 myself with MySQL support. I did a ./configure --with-mysqli=/usr/local/mysql/bin/mysql_config (see end of post for complete configure) Note: I also have...
0
by: Roy Shaw | last post by:
When configuring PHP5 (5.0.3) to use the mysqli libraries I get a "No such file or directory" from the configure script. My goal is to get PHP5 running with mysql 4.1.09 with both the mysql and...
2
by: ojorus | last post by:
Hi! Some questions regarding the mysqli-extension (php5) 1) Prepared statements: If I understand things right, prepared statements will give better performance if you make several similar...
12
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');...
13
by: Schmidty | last post by:
If you do a page reload with $_SERVER will your program lose a mysqli connection upon the reload of the page? Would this code work? I need to know how to carry over a connection between methods as...
2
by: Curtis | last post by:
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...
21
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
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...
2
by: Michael | last post by:
Hi, I try to use mysqli object instead of standard mysql functions. Is it ok to create mysqli object within my class or schould I pass mysqli object to my object. The problem is, with code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.