LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-22-2007, 04:52 PM   #1
shambler
Member
 
Registered: Sep 2006
Location: Canada
Distribution: openSUSE 11.3, Xubuntu 10.10, Ubuntu 11.04
Posts: 53

Rep: Reputation: 23
Question phpinfo() reports wrong mysql version


I got a linux hosting account (godaddy) and ran phpinfo to see exactly what I got.

phpinfo() using php4 reports mysql version is 3.23.49
phpinfo() using php5 reports mysql version is 5.0.18

Writing some php code (php5) and executing
SELECT VERSION()
gives me 4.0.27 (as does the same query in phpmyadmin).

My "guess" is that it's all 4.0.27.


Question: Why would phpinfo be all over the map? Can anything in phpinfo() be trusted?
 
Old 01-22-2007, 05:48 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
The version number reported by phpinfo is the CLIENT API version. The version from SELECT VERSION() gives you the server version. PHP4 was linked against libmysql-3.23.49 and PHP5 against libmysql-5.0.18. phpinfo() is correct.
 
Old 01-22-2007, 06:02 PM   #3
shambler
Member
 
Registered: Sep 2006
Location: Canada
Distribution: openSUSE 11.3, Xubuntu 10.10, Ubuntu 11.04
Posts: 53

Original Poster
Rep: Reputation: 23
Thanks for that info, Matir. I don't know what that means as far as actual capabilities are concerned.

I'm guessing that if used a 5.0.18 feature/function that was not in 4.0.27, it would fail.
 
Old 01-22-2007, 06:13 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by shambler
Thanks for that info, Matir. I don't know what that means as far as actual capabilities are concerned.

I'm guessing that if used a 5.0.18 feature/function that was not in 4.0.27, it would fail.
As far as syntax and functions are concerned, the server version is important, not the client. Quite honestly, other than bugs, I've never seen the client version count for anything.
 
Old 01-22-2007, 06:18 PM   #5
shambler
Member
 
Registered: Sep 2006
Location: Canada
Distribution: openSUSE 11.3, Xubuntu 10.10, Ubuntu 11.04
Posts: 53

Original Poster
Rep: Reputation: 23
That's what I needed to know.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
df reports wrong results jjrowan Linux - Software 4 05-11-2006 10:01 AM
uname -r reports wrong kernel version branque Fedora 5 09-16-2005 10:26 AM
df reports wrong disk usage Mathieu_G Linux - General 4 04-13-2005 02:44 PM
Login reports wrong kernel mdarby Slackware 10 11-28-2004 08:20 PM
PHPMyAdmin reports wrong PHP version. Pcghost Programming 2 10-24-2003 02:21 PM


All times are GMT -5. The time now is 07:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration