# INSTRUCTIONS: Upgrade to PHP 5.3.2 Stable - CentOS and RedHat

**URL:** <https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615>\
**Category:** Hacks / Tools / Tips / Tricks\
**Tags:** php, php-532, how-to, ioncube, php-upgrade\
**Created:** [May 4, 2010, 3:16pm UTC](https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615 "2010-05-04T15:16:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonycl](https://forums.interworx.com/user_avatar/forums.interworx.com/anthonycl/32/54_2.png) [@anthonycl](https://forums.interworx.com/u/anthonycl)\
**Post date:** [May 4, 2010, 3:16pm UTC](https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615/1 "2010-05-04T15:16:38Z")

</div>

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.

```auto
cd /root

```

1. Lets add the Webtatic repo to YUM

```auto
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:

```auto
yum --enablerepo=webtatic [B]install[/B] php

```

or Update:

```auto
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](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:

```auto
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:

```auto
tar xvfz ioncubeX.X.tar.gz

```

or Unzip:

```auto
unzip ioncubeX.X.tar.gz

```

1. Go into the ioncube directory you just unpacked:

```auto
cd ioncube

```

1. Move the ioncube php extension to the php extensions directory.

```auto
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:

```auto
nano /etc/php.d/ioncube.ini

```

Insert this code:

```auto
; 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.

---

<div class="post-metadata">

**Author:** ![marco114](https://forums.interworx.com/user_avatar/forums.interworx.com/marco114/32/8_2.png) [@marco114](https://forums.interworx.com/u/marco114)\
**Post date:** [May 15, 2012, 6:28am UTC](https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615/2 "2012-05-15T06:28:03Z")

</div>

thanks! works great… now installs 5.3.13.

-Marc

---

<div class="post-metadata">

**Author:** ![Nicarlo](https://forums.interworx.com/letter_avatar_proxy/v4/letter/n/b38774/32.png) [@Nicarlo](https://forums.interworx.com/u/Nicarlo)\
**Post date:** [January 8, 2013, 9:58am UTC](https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615/3 "2013-01-08T09:58:30Z")

</div>

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 🙂

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

```

Should be

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

```

Cheers!

---

<div class="post-metadata">

**Author:** ![bblori](https://forums.interworx.com/letter_avatar_proxy/v4/letter/b/82dd89/32.png) [@bblori](https://forums.interworx.com/u/bblori)\
**Post date:** [May 16, 2013, 2:54pm UTC](https://forums.interworx.com/t/instructions-upgrade-to-php-5-3-2-stable-centos-and-redhat/12615/4 "2013-05-16T14:54:25Z")

</div>

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 🙂

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

```

Should be

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

```

Cheers![/QUOTE]
