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
https://forums.phpfreaks.com/topic/91299-installing-mhash/
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
https://forums.phpfreaks.com/topic/91299-installing-mhash/#findComment-468790
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.