After a lot of research, as I couldn’t find answers on forums and other places. I found on sourceforge.net they released some rpm packages to integrate mcrypt and mhash with php.
First we need to install mcrypt and mhash as follows:
1) Install mcrypt & mhash
yum install mcrypt*
yum install mhash*
answer y to the question if matched your system (it should).
2) enable support for php. requires php-mcrypt and php-mhash packages:
yum install php-mcrypt*
yum install php-mhash*
If you get an error saying packages not signed (unsigned packages), do the following:
gpgcheck=1 to gpgcheck=0
attemp step 2 again. Once completed change back yum.conf
Hope this helps and saves anybody else.