PHP 5.3.20: undefined function hash()

2019-08-10 00:12发布

问题:

I'm trying to install Magento on FreeBSD with PHP 5.3.20, but the install script fails with

Fatal error: Call to undefined function hash() in /var/www/.../magento/lib/Zend/Cache/Backend/File.php on line 894

As it's cleared in another StackOverflow question it requires PHP 5.1.2, so that's a different problem. I installed the php5-mhash extension from ports and added mhash.so and hash.so to the extensions.ini. Also, there is no --disable-hash in the configure command. And it's the same in CLI too.

Probably because open_basedir? Any ideas?

回答1:

Try installing it from security and see if this will work for you.

cd /usr/ports/security/php5-hash 
make install clean


标签: php hash