Text by: http://ashu-geek.blogspot.com.br/2011/12/how-to-install-php-53-on-centos-red-hat.html
PHP is a general-purpose server-side scripting languageoriginally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into theHTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications. PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating systemand platform free of charge. There is also commercial software such as RadPHP, a rapid application development framework for the PHP language. A competitor to Microsoft‘s Active Server Pages (ASP) server-side script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers.
Login as root and follow the instructions below.
$ wget -q -O – http://www.atomicorp.com/installers/atomic |sh
Update / Upgrade PHP if it is already installed
If you already have PHP installed and wish to upgrade to PHP 5.3 then run the following:
$ yum update php
Check what packages are going to be updated and proceed if it looks sane.
$ yum install php
Check what other deps are going to be pulled and proceed if you are happy.
Restart Apache and verify the new version is working using phpinfo.php
For this create a file in a directory served up by Apache containing the following information
Call the file phpinfo.php and browse to the file in a web browser e.g http://yourdomain.com/phpinfo.php
At the top of the page it should display the PHP version Apache is using.
Note you will need to update ionCube Loader to the same version.
That’s All and Now enjoy the PHP programming on CentOS / RHEL 5!!!