Installing PHP 5.2 on CentOS
This weekend I wanted to install PHP 5.2 on my CentOS server, but it turns out that the most recent version of PHP in the package manager (yum) was 5.1.6. Why they haven't added 5.2 I don't know, but what you have to do is attach a 3rd party repository and install from there. The process is actually very simple; see the two links below for how to do it (the first is instructions on upgrading, the second is the actual repository). Completing this left me with PHP 5.2.11.
To install MySQL support for PHP, you can use yum to install the package php-mysql. Both of these steps require restarting Apache (/sbin/service httpd restart).
References: