Php – Force update PHP (version won’t update from 5.1.6) SSH

PHP

I cannot update my VPS PHP as it's version 5.1.6 as doing this:

php -v

PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:37)

If I do

yum update php

It will say

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.netcologne.de
 * base: ftp.plusline.de
 * extras: mirror.netcologne.de
 * updates: mirror.mortenlarsen.eu
Setting up Update Process
No Packages marked for Update

How can I force it to upgrade to the latest PHP?

My VPS is CentOS 5.5 32bit.

Best Answer

Centos 5.6 will fix the problem, you should use yum erase to remove the php packages, and use yum install php53 and any of the php5.3 extensions that you need.

This keeps with the binary update philosophy and will reduce maintenance because the centos packages will get the backported security fixes that Redhat provides for the php version installed.

If the upgrade to CentOS 5.6 isn't possible, try the packages from IUS (http://iuscommunity.org/) One of the benefits of keeping with a "Safe Repo" such as IUS or EPEL is that the packages will not cause issue with the base OS packages.

yum remove php php-cgi php-cli php-common
yum update
yum upgrade
cat /etc/*release
    should return: CentOS release 5.6 (Final)
yum install php53
Related Topic