PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 13th, 2006, 08:12 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
PEAR DB::connect to MySQL 5

I maintain an existing PHP/MySQL web application that uses PEAR DB.

PHP 4.3.11
MySQL 3.23.58

The owners of this application have decided to move the database to another machine and have installed MySQL 5.0.21.

I cannot get my existing code to connect to this machine.

I can connect to the MySQL 5 db via the mysql command line from the host where Apache and PHP reside. I have also been able to connect with PHP's mysql_connect command.

I now see that there are mysql and mysqli PHP types. I also saw a note that leads me to believe that you must use mysqli for MySQL 4.1 and above databases? Is that the case (and the source of my problem)? Also it appears that mysqli only works with PHP5?

Thanks

-- Brad

Reply With Quote
  #2  
Old June 13th, 2006, 10:49 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: PEAR DB::connect to MySQL 5

the php4 and mysql5 work together with the mysql_* calls (since you are already connecting with the mysql_connect() - you've proved that). What mysqli and pdo provide is full usage of mysql's new features. the mysql_* was never menat to handle the newer features of MySQL. If you have no plans to use the new features - you should be fine.

Reference:
http://dev.mysql.com/doc/refman/4.1/en/php-problems.html

Reply With Quote
  #3  
Old October 10th, 2006, 11:46 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PEAR DB::connect to MySQL 5

I might have same kind of a problem. Using PEAR:B too.

I have a old computer that has PHP 4.4.0 and mysql 4.1.14, now I'm asked to transfer it to mysql 5.0.18. The new computer has PHP 4.4.4 installed.

I'm able to connect to the database, but it seems that the querys give no result. Although I'm able to login to my system (login username and password coming from the db), nothing else seems to be going/coming through.

I have no idea what to do next. Please help?

Reply With Quote
  #4  
Old October 11th, 2006, 06:08 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: PEAR DB::connect to MySQL 5

All the old code should work fine on the new MySQL version. Best I can say is that on the queries that aren't running to use mysql_error() find out what is wrong.

Reply With Quote
  #5  
Old October 11th, 2006, 08:26 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PEAR DB::connect to MySQL 5

I put
php Code:
Original - php Code
  1. print mysql_error($this->connection)
to simpleQuery on DB/mysql.php and found out that MySQL was offended by the syntax of the querys.
It all lead to some querys having "..from table1 a, table2 b left join table3 c on (a.somecol = c.someothercol) where ..." and just switching places for table1 and table2 corrected it.

Old MySQL had accepted them. Luckily I didn't make those queries.
All fixed now.

Thank you.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > PEAR DB::connect to MySQL 5


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT