RADIUS plugin problem

RADIUS plugin problem

Nosūtīja anh pham
Atbilžu skaits: 4

I get the problem with RADIUS plugin, when I enable it and try to login with a username/password in Domain controller. It gives me an error

"PHP Fatal error:  Call to undefined function mhash() in /var/www/html/moodle/lib/pear/Crypt/CHAP.php on line 447"

Line 447:

"return substr(mhash(MHASH_SHA1, $this->peerChallenge . $this->authChallenge . $this->username), 0, 8);"

I have hash enable in PHP module. I'm using CentOS.

Any help is appreciate.

Vidējais novērtējums: -
Atbildot uz anh pham

Re: RADIUS plugin problem

Nosūtīja Iñaki Arenaza
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls
You need to either compile PHP with the mhash option enabled (note that this is different from hash option/module) or compile mhash extension as a module (and then make sure you load the module).

Saludos.
Iñaki.
Atbildot uz Iñaki Arenaza

Re: RADIUS plugin problem

Nosūtīja anh pham

Thanks so much!

We install php by 'yum'. Could you please show me where to get 'mhash extension'?

Atbildot uz anh pham

Re: RADIUS plugin problem

Nosūtīja Iñaki Arenaza
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls
It should be available in the usual CentOS repositories (but I don't use CentOS, so I'm not sure if it's there or not).

If you don't find it there, as a last resort you can edit lib/pear/Crypt/CHAP.php and change all the instances of 'mhash' to 'hash'

Saludos.
Iñaki.