Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347597 - net-nds/phpldapadmin [mhash] error: Your PHP does not have the mhash() function with 5.3.3-pl1-gentoo
Summary: net-nds/phpldapadmin [mhash] error: Your PHP does not have the mhash() functi...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Jorge Manuel B. S. Vicetto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 20:15 UTC by Daren Hayward
Modified: 2014-04-14 18:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daren Hayward 2010-12-02 20:15:12 UTC
When trying to change the sambaLMPassword or sambaNTPassword in phpldapadmin the following message is displayed.

Your PHP install does not have the mhash() function.
Comment 1 Daren Hayward 2010-12-02 20:19:40 UTC
Fixed with this modification, also modified the iconv to use mb_convert_encoding.
in phpldapadmin/lib/createlm.php

    public function nthash($password = "") {
        if (function_exists('mhash'))
            if (defined('MHASH_MD4'))
                return strtoupper(bin2hex(mhash(MHASH_MD4,iconv('UTF-8','UTF-16LE',$password))));
        if (function_exists('hash'))
            return strtoupper(hash('md4', mb_convert_encoding($password, "UTF-16LE", "UTF-8")));
        else
            error(_('Your PHP install does not have the mhash() or hash() function. Cannot do hashes.'),'error','index.php');
    }
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-07 01:36:57 UTC
So net-nds/phpldapadmin would need dev-lang/php[mhash]?
Comment 3 Daren Hayward 2010-12-11 20:10:49 UTC
(In reply to comment #2)
> So net-nds/phpldapadmin would need dev-lang/php[mhash]?
> 

 emerge -pv dev-lang/php

These are the packages that would be merged, in order:

Calculating dependencies ... done!
[ebuild   R   ] dev-lang/php-5.3.3-r1  USE="apache2 berkdb bzip2 cgi cli crypt ctype fileinfo filter gd gdbm hash iconv ipv6 json ldap ldap-sasl mysql nls phar posix readline session simplexml snmp spell ssl threads tokenizer truetype unicode xml xmlreader xmlwriter zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cjk -concurrentmodphp -curl -curlwrappers -db2 (-dbmaker) -debug -doc -embed (-empress) (-empress-bcs) -enchant (-esoob) -exif (-firebird) -flatfile -fpm (-frontbase) -ftp -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -libedit -mssql -mysqli -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -soap -sockets (-solid) -sqlite -sqlite3 -suhosin (-sybase-ct) -sysvipc -tidy -wddx -xmlrpc -xpm -xsl -zip" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

No mhash option and hash is enabled.
mhash is in USE flags in make.conf
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2014-04-14 18:58:48 UTC
Is this still relevant?