How to upgrade PHP 5.1.6 to PHP 5.3.x on CentOS?

I have been using CentOS 5.x for several years now, but PHP is still at 5.1.6 on the latest CentOS 5.7. More and more applications are now require higher versions of the PHP including Drupal 7 and Wordpress 3.2. I have upgraded a number of my servers to PHP 5.3.x over the course of last couple of years, and demand is higher each year. I have been using several custom repositories to upgrade the PHP to 5.3.x in the past, but using php53 packages makes it easier than ever to upgrade php to 5.3.x.

PHP 5.2 and 5.3 are mostly backward compatible with PHP 5.1.x except for a few 5.2 and 5.3 incompatibilities.

To upgrade PHP 5.1.x to 5.3.x, login to the server as a root user.

# yum remove php php-*
# yum install php53 php53-*
# service httpd restart

Tags: 

Comments

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.