To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Upgrading PHP

Upgrading PHP Issues concerning PHP version upgrades and future releases

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-29-2004, 10:53 AM   #1
allididntwantto
Junior Member
 
Join Date: Jun 2004
Posts: 3
Unhappy MySQL, too many connections - using mysqli and PHP5

I'm developing a system in PHP5 with the new mysqli extension. After a while of developing I got an error saying MySQL had too many connections - I checked and they were all in the status of 'Sleep'. I restarted the MySQL server and added code into my script to close the DB connections (good practice anyways I know, but technically PHP should close connection at the end of the script execution). The same problem with too many connections still occurs.

Is this something to do with mysqli or PHP5 or... ?

Help me please! It's driving me nuts!

Simon Plenderleith
allididntwantto is offline   Reply With Quote
Old 07-01-2004, 03:54 PM   #2
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
Just out of curiosity, why do you need to use the Improved mysql client libraries instead of the normal ones?
__________________
Many eyes make few mistakes

goldendance
goldbug is offline   Reply With Quote
Old 07-02-2004, 10:24 AM   #3
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,128
Have you tried any of the suggestions for MySQL and PHP4 that have been made in these forums before?
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Old 07-02-2004, 03:04 PM   #4
rpanning
Tandem Web Works
 
rpanning's Avatar
 
Join Date: Dec 2002
Location: MN, USA
Posts: 444
Quote:
Originally posted by goldbug
Just out of curiosity, why do you need to use the Improved mysql client libraries instead of the normal ones?
The mySQLi extension is made to access mySQL 4.1 and higher. The regular mySQL extenstion is for anything below that. Quotes from php.net
Quote:
mySQLi
The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above.
Quote:
mySQL
This MySQL extension doesn't support full functionality of MySQL versions greater than 4.1.0. For that, use MySQLi.
__________________
Are you a mountain biker and live in Minnesota? Join MORC to help support our trials!
rpanning is offline   Reply With Quote
Old 07-02-2004, 03:24 PM   #5
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
Partially true.

You can still use the regular (and arguably more stable) mysql extensions with higher versions. I personally build PHP5 against MySQL 5.0a on one of my boxes and it doesn't complain.

One thing you might want to keep in mind though... on the very same pages of the manual (yes, I have already read it, but thanks for quoting it anyway ), it also states that the MySQLi extension is experimental. Usually when I see words like that, I don't expect stuff to work perfectly.
__________________
Many eyes make few mistakes

goldendance
goldbug is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:47 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.