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
-
SSH into your box as root
-
Ensure your in your /root directory.
cd /root
- 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
- 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
- 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)
- Untar the file or unzip it:
Untar:
tar xvfz ioncubeX.X.tar.gz
or Unzip:
unzip ioncubeX.X.tar.gz
- Go into the ioncube directory you just unpacked:
cd ioncube
- 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.)
- 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.