OS & Software

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.

Support us by making a small donation

Hey, you! We hope that this article was helpful, interesting, entertaining or at the least worthy of your time. If you want to support us so we can write more articles like this one, you can make a small donation. It’s really easy. Simply use the button below, and choose how many $1 dollar “purchase” you want to make.

Your donation will be used to keep the lights on, to buy equipment and software and to fuel our thirst for water and coca cola.



Comments are closed.

%d bloggers like this: