Source: php.net 5.3.0 latest stable build of 5.3 branch

./configure –prefix=/usr/local/php5
–mandir=/usr/share/man
–infodir=/usr/share/info
–sysconfdir=/etc
–with-config-file-path=/etc
–with-zlib
–with-zlib-dir=/usr
–with-openssl
–without-iconv
–enable-exif
–enable-ftp
–enable-mbstring
–enable-mbregex
–enable-sockets
–with-mysql=/usr/local/mysql
–with-pdo-mysql=/usr/local/mysql
–with-mysqli=/usr/local/mysql/bin/mysql_config
–with-apxs2=/usr/local/apache2/bin/apxs

Error:

checking libxml2 install dir… no
checking for xml2-config path…
configure: error: xml2-config not found.
Please check your libxml2 installation.

After a yum install libxml2-devel.x86_64:

configure: error: Cannot find OpenSSL’s

yum install openssl-devel [fixed it]

Found a good resource at https://www.eukhost.com/forums/f15/troubleshooting-php-installations-compilations-linux-servers-6041/

Done.