Portal Home > Knowledgebase > Articles Database > What is my php version??


What is my php version??




Posted by gpl24, 08-23-2008, 02:55 AM
According to /cpanel: 5.2.6 According to phpmyadmin: 5.2.3 Which is true?? And why do they have 2 different version numbers? (For phpmyadmin, I exported a database with no compression and opened it):

Posted by CretaForce, 08-23-2008, 03:17 AM
Create a phpinfo.php file and inside write: Then upload it to the server and point your browser to the url.

Posted by blazenetworks, 08-23-2008, 03:18 AM
try and see the output in browser. that is your real php version. cpanel may be running under chroot jail with different php version. It is only for cpanel not for your usage. the output of phpinfo(); is your real/usable php version.

Posted by gpl24, 08-23-2008, 03:34 AM
According to phpinfo() PHP Version 5.2.6 Anyone know why phpmyadmin thinks I'm out of date? It isn't possible to be running to versions of php5 at the same time, is it?

Posted by PhireFast, 08-23-2008, 04:13 AM
Hmmm, that is a weird case. I wonder if phpmyadmin can be forced to update that? (like with a script)

Posted by gpl24, 08-23-2008, 04:26 AM
I'd always assumed phpmyadmin was updated with cpanel. Am I wrong? If I am not mistaken, when php upgraded to 5.2.6 it was via ssh ..the technicalities I am not particular of, as PSM had done it. Since then, I've ran the update wizard for cpanel (to upgrade to the latest version of cpanel) via WHM though.

Posted by InvisionSrv, 08-23-2008, 05:50 PM
Do you keep your cpanel updated? From what I can tell, cPanel updated their internal PHP to 5.2.6 on June 8, 2008. You can check that in SSH> /usr/local/cpanel/3rdparty/bin/php -v

Posted by gpl24, 08-23-2008, 11:42 PM
Yes. PHP was updated shortly after the security patch for 5.2.6 came out, so it would have been first updated in May sometime, if I recall correctly.

Posted by RBBOT, 08-24-2008, 05:12 PM
search for "php" on your hard disk - maybe you have multiple copies installed. You can run each one from the ssh command line with ./php -i to see the same output as

Posted by gpl24, 08-25-2008, 03:16 AM
How do I search for php on the hard disk?

Posted by RBBOT, 08-25-2008, 09:17 AM
find / -name php -not -type d Last edited by RBBOT; 08-25-2008 at 09:21 AM.

Posted by markhard, 08-25-2008, 12:00 PM
i think cpanel use 2 php, one is for the hosting (apache) which you can compile/update using the easyapache and second is used for cpanel's internal purposes such as phpmyadmin.

Posted by Dave Parish, 08-25-2008, 12:19 PM
I had the same issue, I had to update my kernel and then update everything through cpanel.

Posted by cPanelDavidG, 08-25-2008, 01:22 PM
That is correct, Apache uses one installation of PHP using the version you set via EasyApache and content served by cpsrvd (cPanel, WHM, phpMyAdmin etc.) uses a different installation of PHP.

Posted by abhishek11683, 08-25-2008, 09:02 PM
You can also check whether any rpm package is installed for php (for redhat, fedora or centos). Use command rpm -qa | grep php Just see if any other version is listed there.

Posted by LnxtecH, 08-26-2008, 01:35 AM
Cpanel use a different php installation. Run command /usr/local/cpanel/bin/checkphpv and it will display which php binary is being used by cpanel. Then check the version of that php binary. Or simply create a phpinfo file in /usr/local/cpanel/base/frontend/x3/ and access it via cpanel (login to cpanel and call the script directly from the address bar, ie http://www.domain.com:2082/frontend/x3/phpinfo.php) to check the cpanel php version.

Posted by gpl24, 08-26-2008, 02:03 AM
Thanks everybody. Why don't these 2 versions stay updated together? How can I update the out of date version?

Posted by LnxtecH, 08-27-2008, 01:58 AM
scripts/makecpphp

Posted by koithara, 08-27-2008, 03:15 AM
Just get the results for :

Posted by cPanelDavidG, 08-27-2008, 12:02 PM
In the latest builds of cPanel/WHM and EasyApache, updating PHP via EasyApache will also update cPanel's internal PHP (cpphp). You can verify this by running: /usr/local/cpanel/3rdparty/bin/php -v

Posted by gpl24, 08-30-2008, 01:07 AM
I am using WHM 11.23.2 cPanel 11.23.4-R26138 I ran the following: They all seem up to date, so what is with phpmyadmin displaying another version?

Posted by cPanelDavidG, 09-02-2008, 01:53 PM
I know some apps will cache this information assuming the PHP version will not change very often. However, your command line output shows that the internal PHP that cPanel/WHM uses is on version 5.2.6.

Posted by gpl24, 09-03-2008, 03:23 AM
Good to know, thanks for explaining Bit of a stupid question: I've not updated php myself yet. When there is a new version released, does WHM automatically do it when I opt to update cpanel, or do I need to do some commands in ssh? At present, I use WHM to install all of cpanel's updates.

Posted by cPanelDavidG, 09-03-2008, 11:35 AM
Apache and PHP are not automatically upgraded in a cPanel/WHM environment. As they are compiled in a cPanel/WHM environment, it is good practice to watch the compile process to ensure nothing goes awry. While a failed compile process is an unlikely event, this practice is still considered prudent. As a result, you need to run EasyApache to upgrade PHP and/or Apache. Neither will be upgraded until you run EasyApache via either SSH (/scripts/easyapache which is an interactive script) or WHM (WHM -> Software -> Apache Update).



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
UK Dedicated Servers (Views: 833)
Up2vps down!!! (Views: 797)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.