Jump to content

Installing mhash


Recommended Posts

I am using the "mhash" function in some of my PHP scripts, although when I tried to run the script I realized that I didn't have the mhash library installed.  It screamed at me saying the function was not found.

 

So I went to the sourceforge site for mhash, downloaded it, and installed it.  It said that it installed successfully, but for some reason the "mhash" function still can't be found by PHP.  I am using Mac OS X.  Any thoughts on what the problem could be?

Link to comment
Share on other sites

You should have compiled php with the --with-mhash=[dir] option enabled.

 

If you want to go about building the extension after the fact you will need to use phpize.

 

The basics of it are. Download your current version of php's source code from php.net. Unpack it and cd into the source tree then....

 

$ cd ext/mhash
$ phpize
$ ./configure --help # apply configure options here.
$ make

 

This should build an *so file which you will find within the modules directory. Simply copy this file to your php installs extensions directory and restart apache.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.