LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   phpinfo() reports wrong mysql version (https://www.linuxquestions.org/questions/linux-server-73/phpinfo-reports-wrong-mysql-version-521830/)

shambler 01-22-2007 04:52 PM

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?

Matir 01-22-2007 05:48 PM

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.

shambler 01-22-2007 06:02 PM

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.

Matir 01-22-2007 06:13 PM

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.

shambler 01-22-2007 06:18 PM

That's what I needed to know.

Thanks.


All times are GMT -5. The time now is 06:46 PM.