Install Mhash in php 5.3+ in cPanel Centos Linux servers

The php-mhash installation in php 5.3 is very easy. Please use the following steps to install it

1) Download the latest mhash from and install it as follows,

# tar -xzf  mhash-
# ./configure --prefix=/opt/mhash
#  make
#  make install

2) Now add it to the loader configuration in /etc/


3) Now edit the file /var/cpanel/easy/apache/rawopts/all_php5 and add the following line


4) Finally compile the php using the following command

#  /scripts/easyapache --build

You can test the mhash by creating a phpinfo page in your website document root.