I have access to a Linux box and SSH. I need the latest version of PHP. What will the following do:

sudo apt-get install php5

Right now, I have PHP Version 5.1.6. Not sure if the above command is correct.

Also, I have access to Panel version 10.0.1. Can I upgrade PHP from there?

link|improve this question

"Linux" isn't specific enough, neither is "latest version", and "Panel"...? – womble Jul 17 '11 at 6:20
By latest, do you mean latest available from your distro or latest provided by upstream?. – Tshepang Jul 17 '11 at 7:59
feedback

closed as off topic by womble, sysadmin1138 Jul 17 '11 at 14:50

Questions on Server Fault are expected to generally relate to servers, networking, or desktop infrastructure, within the scope defined in the faq.

2 Answers

try here, but this one is for a redhat linux. you need to be specific on what linux distros you are talking about.

http://nixcraft.com/centos-rhel-fedora/13606-redhat-upgrade-php.html

link|improve this answer
1  
apt-get implies a Debian-like system – Tshepang Jul 17 '11 at 7:56
1  
And currently having PHP 5.1.6 installed strongly implies a CentOS/RHEL 5.x system. Debian Lenny shipped with 5.2.6, Ubuntu Dapper shipped with 5.1.2, and Ubuntu Hardy shipped with 5.2.4. RHEL 5, on the other hand... 5.1.6. – womble Jul 17 '11 at 8:32
feedback

from ubuntu forums:

An upgrade will only install security updates. The full answer is, that You should seriously consider updating to a newer release (using sudo do-release-upgrade)

To check the current version, you can:

  • Check in Synaptic.
  • Make a new PHP page containing: <?php phpinfo() ?>, which tells you all about your current PHP configuration.
  • Install the apt-show-versions package, and then run $ apt-show-versions php5.

hope it helps.

link|improve this answer
sebastian_h - I made edits to your response. Which command actually does the update? – StackOverflowNewbie Jul 17 '11 at 6:21
None of them. I have no idea what value this answer is supposed to provide. – womble Jul 17 '11 at 7:18
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.