INSTRUCTIONS: Upgrade to PHP 5.3.2 Stable - CentOS and RedHat

Hello Everyone,

I have searched far and near for a simple solution for CentOS and RedHat to install or update php and its binaries to the latest 5.3.2 and ioncube. So I decided to make a guide for it here in just a few simple steps.

Installing or Upgrading PHP 5.3.2

  1. SSH into your box as root

  2. Ensure your in your /root directory.

cd /root
  1. Lets add the Webtatic repo to YUM
rpm -ivh http:[B]//[/B]repo.webtatic.com[B]/[/B]yum[B]/[/B]centos[B]/[/B]5[B]/`[/B][B]uname[/B]  -i[B]`/[/B]webtatic-release-5-0.noarch.rpm
  1. We have two options here:
    Install:
yum --enablerepo=webtatic [B]install[/B] php

or Update:

yum --enablerepo=webtatic [B]update[/B]    php

(If this does not work please try to disable regular repo’s by adding the --disablerepo=* flag before the --enablerepo=webtatic flag)

Installing or Upgrading Ioncube 5.3

  1. Go to http://www.ioncube.com/loaders.php and download the latest version for your OS. (I prefer zip format)
    Right Click the URL, Copy, and paste like so:
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip


(The example url is the latest 64 bit version, at the time of this post)

  1. Untar the file or unzip it:
    Untar:
tar xvfz ioncubeX.X.tar.gz

or Unzip:

unzip  ioncubeX.X.tar.gz
  1. Go into the ioncube directory you just unpacked:
cd ioncube
  1. Move the ioncube php extension to the php extensions directory.
cp ioncube_loader_lin_5.3.so /usr/lib64/php/modules/ioncube_loader_lin_5.1.so


(This is the correct directory on most 64 bit systems. If this is incorrect run ‘ls -lai /usr’ and check to see where it is.)

  1. Now you need to create a new file and insert the following code into it:
    Create/open the file:
nano /etc/php.d/ioncube.ini

Insert this code:

; Enable ioncube extension module
zend_extension =  /usr/lib64/php/modules/ioncube_loader_lin_5.1.so

That’s it!

Restart or Gracefully Restart Apache via Interworx, and your all set! This has been verified on both x86-32 bit and x86-64 bit CentOS 5.4 installs.

thanks! works great… now installs 5.3.13.

-Marc

Great How-to!

Just a little correction

Since we are upgrading to php 5.3 we need the ioncube 5.3 extension and not the 5.1 :slight_smile:

; Enable ioncube extension module
zend_extension =  /usr/lib64/php/modules/ioncube_loader_lin_5.1.so

Should be

; Enable ioncube extension module
zend_extension =  /usr/lib64/php/modules/ioncube_loader_lin_5.3.so

Cheers!

For x86-32 bit should be

; Enable ioncube extension module
zend_extension = /usr/lib/php/modules/ioncube_loader_lin_5.3.so

[QUOTE=Nicarlo;21047]Great How-to!

Just a little correction

Since we are upgrading to php 5.3 we need the ioncube 5.3 extension and not the 5.1 :slight_smile:

; Enable ioncube extension module
zend_extension =  /usr/lib64/php/modules/ioncube_loader_lin_5.1.so

Should be

; Enable ioncube extension module
zend_extension =  /usr/lib64/php/modules/ioncube_loader_lin_5.3.so

Cheers![/QUOTE]