A few people have issues with installing PHP 5.4 in CentOS 6.4
Here is a simple guide to do this.
PHP 5.4.0 adds new features such as:
- Traits
- Built-in web server
- Array short notation
- Array return value de-referencing
- Finally killing off magic-quotes and safe-mode
To install, first you must add the Webtatic EL6 yum repository information to yum:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Now you can install php by doing:
yum install php54w
If you would like to upgrade php to this version it is recommended that you first check that your system will support the upgrade, e.g. making sure any CPanel-like software can run after the upgrade.
If there is no complication in installing, it is recommended you remove your existing PHP installation before installing Webtatic’s version as described above.
Opcode Caches
A precompiled PHP APC package is available as an opcode cache, which is recommended for performance reasons. It can be installed via:
yum install php54w-pecl-apc
Zend have now released Zend Optimizer Plus opcode cache as open source, and is now known as Zend OPcache. As it’s more actively maintained than APC, it has been added as a package to the Webtatic EL6 repository. It can be installed via:
yum install php54w-pecl-zendopcache
Disclaimer – This guide has come from http://www.webtatic.com/packages/php54/
Leave A Comment