Install PHP 5.3 mcrypt extension on Centos 5.6

yum install php53-devel
yum install libmcrypt-devel
yum install gcc
wget http://museum.php.net/php5/php-5.3.3.tar.bz2
tar xvjf php-5.3.3.tar.bz2
cd php-5.3.3/ext/mcrypt/
phpize
aclocal
./configure
make
make install
echo "extension=mcrypt.so" > /etc/php.d/mcrypt.ini
service httpd restart

If the above code doesn’t work try the below code

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm
Install PHP 5.3 mcrypt extension on Centos 5.6

phpize failed

Run the command below:

yum install php-devel
phpize failed