I'm assuming that you already have php installed.
First of all you have to download the source code from here:
http://sourceforge.net/project/showfiles.php?group_id=4286
Then you have to use either FTP or SSH client to upload it to your linux server.
Once the tar.gz file is on the server you have to navigate into that directory.(whereever you stored it, (i.e /usr/local)
Then issue the following command:
tar -xzvf mhash-0.9.1.tar.gz (this command will extract mhash into it's own directory) if you ran this command from /usr/local, there will be a newly created folder called mhash-0.9.1
Go into that directory and type the following commands (one at a time):
./configure (Press enter and wait till it's done)
make (Press enter and wait till it's done)
make install (Press enter and wait till it's done)
Once this is done then you must compile PHP with it.
Find your main php directory and go to it using the (cd /phpdirectory)command.
Once you find it then run the following command from inside this directory:
./configure --with-mhash=(put here the directory where mhash was installed to)
If you follow these steps, this should solve your problem..