Upgrade php on centos (VPS)

1 June, 2011 (22:13) | php, VPS | By: sblogadmin

Question: How do I upgrade php to the latest version on my VPS running centos?

Answer:

From the shell, run:

wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
wget ftp://ftp.muug.mb.ca/mirror/fedora/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm remi-release-5.rpm
yum -y --enablerepo=remi update php mysql
/sbin/service httpd restart

You also may want to edit /etc/php.ini and change :

short_open_tag = Off

to

short_open_tag = On

without this change php code will only work when using the full:

 

<?php

 

open tag.

 

Write a comment