How-to install MHASH on Ubuntu

I’d like to go ahead and apologize if this “how-to” isn’t as useful / clear as the others that I’ve written until now.  To be honest, I’m just writing this post as a reminder for myself.  But hey!  If you find it usefull, knock yourself out!  And feel free to ask for more details – when I get to it, I’ll gladly offer them.

Problem at hand:  I was trying to convert an Ogone payment module that was sent to me by a costumer; to a module that could be used in his new website.  As the programmer pointed out, I needed to enable MHASH_SHA1 in order to “hash” a password that’s being sent to the Ogone secure site.

Looking back, that was by far the easiest part of this whole “experience”.  Here’s the steps I took:

  1.   Find and download the DEB file for “Libltdl3”  I’m saying “find”, because I had to actually, physically download it to my Ubuntu virtual box (Other than Joomla / other CMS packages I haven’t downloaded anything on that box for ages).  I found it somewhere on packages.ubuntu.comTo be honest, I don’t know what this package is used for; or if it’s neccessary.  I just read somewhere that I needed to install it, and followed orders.
  2.   Using the terminal, download the php5-mhash and php5-mcrypt packages; which are needed to add MHASH_SHA1 functionality to your PHP framework.  In case you forgot, this is the fastest way to do this
    • sudo apt-get install php5-mhash
    • sudo apt-get install php5-mcrypt
  3. Once those packages are installed, you’ll have to restart your Apache Server.  If you’re one of the cool kids, like me, who are using Apache2, this is the Terminal Command to get it done:
    • sudo /etc/init.d/apache2 restart

Once the Apache server is restarted, you’ll see that your MHASH commands can now be properly executed by the PHP framework.


3 thoughts on “How-to install MHASH on Ubuntu”

  1. Pingback: How-to install MHASH on Ubuntu « Toretto's Blog Ubuntu Netbook

  2. Pingback: Howto-install-MHASH-on-Ubuntu : Sysmaya

Comments are closed.

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading