Closed rcubetrac closed 10 years ago
Summary changed by leeyc0 on 18 Sep 2014 06:42 UTC
password plugin doesn't work in php 5.3 or later if password driver is set to ldap/ldap_simple
password plugin doesn't work in php 5.3 or later if password driver is set to ldap or ldap_simple
Comment by @alecpl on 18 Sep 2014 09:11 UTC
Documentation says it's emulated by hash extension. Does that mean mhash* functions does not work or throw warnings?
Milestone changed by @alecpl on 18 Sep 2014 09:11 UTC
later => 1.1-beta
Comment by leeyc0 on 18 Sep 2014 09:20 UTC
It says "Could not save new password. Encryption function missing". And it's because function_exists('mhash_keygen_s2k') and/or function_exists('mhash') failed.
Comment by @alecpl on 28 Sep 2014 08:02 UTC
But do you have 'hash' extension installed? I have PHP 5.5 and have both hash and mhash working. Documentation says (http://php.net/manual/en/mhash.installation.php) mhash functions are emulated by hash extension I have no reasons to not believe that.
Comment by leeyc0 on 28 Sep 2014 08:32 UTC
Yes, I did install hash extension. But mhash_keygen_s2k is not covered by hash extension.
http://svn.php.net/viewvc/phpdoc/en/trunk/appendices/migration53.xml?view=markup&pathrev=304624
Comment by @alecpl on 28 Sep 2014 17:03 UTC
Still I have mhash extension in my PHP 5.5. Anyway, I fixed it in 5c3bbb9e0d.
Status changed by @alecpl on 28 Sep 2014 17:03 UTC
new => closed
Reported by leeyc0 on 18 Sep 2014 06:41 UTC as Trac ticket #1490076
In php 5.3, mhash() (http:_php.net/manual/en/book.mhash.php) is deprecated and replaced by hash() (http:_php.net/manual/en/book.hash.php). However there are extensive uses of mhash in drivers/ldap.php, and need to replaced with hash(). There is a exception though, there is no replacement for mhash_keygen_s2k(), but seems that there is a simple php-only implementation as I found at http://php.net/manual/en/function.mhash-keygen-s2k.php.
Please update the ldap driver to support php 5.3 or later.
Migrated-From: http://trac.roundcube.net/ticket/1490076