tags:

views:

490

answers:

2

I'm tying out a new moodle module, which provides integration with Windows Live.

When using the live authentication I get a blank page. Switch on PHP error logging and get:

Fatal error: Call to undefined function hash_hmac() in /srv/www/htdocs/moodle/auth/liveid/windowslivelogin.php on line 1293

Line 1293 is: return hash_hmac("sha256", $token, $signkey, true);

I have compiled PHP with the mhash extension.

My question is how can I test hash_hmac() functionality on my server?

Cheers,

Nathan.

+1  A: 

It looks like hash_hmac() is in the hash extension not mhash, although apparently by default it is enabled since 5.1.2 (http://uk3.php.net/releases/5_1_2.php).

Tom Haigh
The extension is shipped with PHP since version 5.1.2.
Philippe Gerber
yep, found that as you were adding that. thanks
Tom Haigh
A: 

To add hash to PHP in SUSE 10.2

zypper install php5-devel

pecl install hash

add extension = hash.so to /etc/php5/apache2/php.ini

restart apache

Nathan Friend