473,699 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2764
On 10 Dec 2006 02:39:42 -0800, "Curtis" <dy****@gmail.c omwrote:
>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.u k :: 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.c omwrote:
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.u k :: 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
1887
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 --with-mysql=/usr/local/mysql/. However, I get the same errors when I configure without the mysql extension, just mysqli. And as the documentation says, I use the same version of MySQL for both extensions to avoid conflicts.
0
2135
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 mysqli options. I can get it to configure and work correctly with just the mysql but NOT the mysqli or both. Environment: Red Hat Enterprise Linux 3, rel 4 php 5.0.3 from sources from php.net
2
2730
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 querys. (where you only change the parameters) But what if you do only ONE query; will it then be usefull to use prepared statements? Can it actuelly give better performance NOT to use prepared statements in that case? 2) Are there any DISadvantages...
12
4744
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'); define('DB_PASSWORD', 'practical'); define('DB_DATABASE', 'ajax'); // connect to the database $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
13
3711
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 I am new to OOP? Thanks... Example; ======================================== <?php // webpage $newsignon = new newuser(); logon();
2
2601
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 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...
21
7271
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 have to far: <?php class sql_db extends mysqli { var $connection = false;
11
11089
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 PDO briefly but I've not used the mysqli extension yet. I've read a bit about it though, seems good and more OOP orientated (for the most part). But PDO seems more generic and transferable.
2
3208
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 below I must call mysqli->connect() each time I call class methods. How do I create an connection for hole object, so methods can do queries without connect each time? Best Regards, Michael
0
9042
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8929
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8891
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5878
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4634
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3061
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 we have to send another system
2
2357
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2013
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.