Default CentOS repo accessible with yum would not have proper PHP version and you would need to add Webtastic repo with

# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

As mentioned above we are interested in latest stable version of PHP 5.5. Let’s make sure it is in fact available for installation

# yum list available | grep php55

then examine output to make sure php55w packages are present.

Depend on your current configuration, you may need some additional PHP libraries (full list can be found here), so please take a note of what packages you have installed and setup in your system before proceeding with next step

Now you can install the new PHP 5.5 core and packages. Options below is most basic and commonly used configuration for 64bit system

First will ensure that we do have replace option support and then update php-common package before we update PHP core

php -v command shows ionCube compatibility error

Simply put, ionCube extension is older version and not compatible with new PHP version.

What is the ionCube in the first place and why we better keep it?

ionCube is an PHP code encryption extension usually used with Zend Engine and allows protect otherwise open text PHP code from direct access and analysis. Many commercial PHP products would come encrypted and without this extension you may no longer will able to use them.

Let’s assume ionCube is here to stay and let’s see what we can do to reanimate it.

Visit ionCube download section and get two files: Loader Wizard or loader-wizard.php (do not confuse it with Loader Installer) and Loader package for Linux 64-bit

Unpack Loader package along with loader-wizard.php into web server folder which you can later access from your browser

Open loader-wizard.php in your browser and follow steps presented

Once all steps are completed and wizards verifies the location of the required ionCube extension file, restart Apache and verify PHP version again. You should see ionCube is now loaded successfully

# service httpd restart
# php -v

In some cases PHP would unable to load proper version of ionCube
Try the following:

visit /etc/php.d folder and look for 00-ioncube-loader.ini or similar

if located open for edit and check what zend_extension file is referenced to make sure proper version of the loader is used

php -v command shows timezone warning

PHP Warning: date(): It is not safe to rely on the system's timezone settings

This message easily to notice when you run php -v after upgrading to latest version of PHP as it is no longer set by default.

Use string name of the time zone desired. Please note that you need to enclose name in double quotes

date.timezone="America/New_York"

Since you are editing PHP settings, you may as well increase PHP memory limit to 512M by changing

memory_limit=512M

Save your changes and exit out of text editor

Restart Apache

service httpd restart

Final thoughts

While not strictly necessary, I would recommend reboot your server. This may help with some phantom issues encountered rarely due to some ongoing active processes.
Don’t forget to log off and close your SSH session

About

From being a junior developer all the way to Development Manager position, I was always interested in new technologies. Passionate speaker, IT junky, developer, architect, team lead, and development manager - many hats, one goal - making software better and closer to people’s needs. For the most part I am using my blog as a scratch pad, writing small articles on things which I came across, was asked about more then once, and which would otherwise require additional research again and again.

Testimonials

First I’m new to G3. I was wanting to append my forum with a gallery and after doing a lot...