Hello, I tried to run skipped mhash tests in ext/hash, these ones in trunk:
SKIP mhash()
test [ext/hash/tests/mhash_001.phpt] reason: mhash
extension is not available
SKIP mhash_get_block_size()
& mhash_get_hash_name()
test
[ext/hash/tests/mhash_002.phpt] reason: mhash extension is not
available
SKIP mhash_keygen_s2k()
test [ext/hash/tests/mhash_003.phpt] reason:
mhash extension is not available
SKIP mhash()
modifying algorithm parameter
[ext/hash/tests/mhash_004.phpt] reason: mhash extension is not
available
My configure line:
'./configure' '--with-bz2' '--enable-bcmath'
'--with-apxs2=/usr/bin/apxs2' '--with-gd' '--enable-calendar'
'--enable-gd-native-ttf' '--with-freetype-dir' '--with-jpeg-dir'
'--with-png-dir' '--enable-exif' '--with-mysql' '--with-zlib'
'--with-gettext' '--with-mcrypt' '--with-ldap' '--with-iconv'
'--enable-sockets' '--with-openssl' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-pspell' '--with-pdo-mysql'
'--with-pdo-sqlite' '--enable-soap' '--enable-xmlreader' '--with-xsl'
'--enable-ftp' '--enable-cgi' '--with-curl' '--with-tidy'
'--with-xmlrpc' '--enable-mbstring' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-shmop'
'--with-readline' '--with-mysqli' '--enable-zip' '--enable-wddx'
'--enable-pdo' '--with-pdo-firebird' '--with-interbase'
'--with-enchant' '--enable-intl' '--with-mhash'
So, as you see, I actually have --with-mhash in the end and don't have
--disable-hash, so usual hash tests pass correctly.
From the docs (http://www.php.net/manual/en/mhash.installation.php)
I've found out that mhash is now emulated by hash extension and is
actually obsoleted.
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?
If not, I'd like to know how to run these tests.
Thank you.
--
Regards,
Shein Alexey
hi,
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?
I don't think we should, they are here to make sure that the emulation
layer works fine.
If not, I'd like to know how to run these tests.
Maybe the skipif is wrong, as far as I remember there was an issue
with seeing the "mhash" layer as being the mhash extension. Maybe we
should change the skipif and uses function_exists instead? Have you
tried it?
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
hi,
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?I don't think we should, they are here to make sure that the emulation
layer works fine.If not, I'd like to know how to run these tests.
Maybe the skipif is wrong, as far as I remember there was an issue
with seeing the "mhash" layer as being the mhash extension. Maybe we
should change the skipif and uses function_exists instead? Have you
tried it?
It definitely should have a 'mhash' entry, it creates a mhash_module_entry and registers that.
If you enable mash only, it silently enables hash.
- Scott
2011/9/15 Pierre Joye pierre.php@gmail.com:
hi,
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?I don't think we should, they are here to make sure that the emulation
layer works fine.If not, I'd like to know how to run these tests.
Maybe the skipif is wrong, as far as I remember there was an issue
with seeing the "mhash" layer as being the mhash extension. Maybe we
should change the skipif and uses function_exists instead? Have you
tried it?
They both return false for me:
conf@laptop ~/php-src/trunk $ sapi/cli/php -r
'var_dump(extension_loaded("mhash"), function_exists("mhash"));'
bool(false)
bool(false)
conf@laptop ~/php-src/trunk $
--
Pierre@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
--
Regards,
Shein Alexey
2011/9/15 Pierre Joye pierre.php@gmail.com:
hi,
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?I don't think we should, they are here to make sure that the emulation
layer works fine.If not, I'd like to know how to run these tests.
Maybe the skipif is wrong, as far as I remember there was an issue
with seeing the "mhash" layer as being the mhash extension. Maybe we
should change the skipif and uses function_exists instead? Have you
tried it?They both return false for me:
conf@laptop ~/php-src/trunk $ sapi/cli/php -r
'var_dump(extension_loaded("mhash"), function_exists("mhash"));'
bool(false)
bool(false)
conf@laptop ~/php-src/trunk $
Definitely works for me on latest trunk. Does a shorter configure fix this? I wonder if something elsewhere is breaking this.
macvicar-mba:trunk macvicar$ cat config.nice
#! /bin/sh
Created by configure
'./configure'
'--disable-all'
'--with-mhash'
"$@"
macvicar-mba:trunk macvicar$ sapi/cli/php -m
[PHP Modules]
Core
date
ereg
hash
mhash
pcre
Reflection
SPL
standard
[Zend Modules]
macvicar-mba:trunk macvicar$ sapi/cli/php -r 'var_dump(extension_loaded("mhash"));'
bool(true)
It's very strange but after 5-6 recompiles with different
configurations (I tried to reduce "breaking" setup) my current
configuration started to work itself.
Thanks everybody for help.
2011/9/15 Scott MacVicar scott@macvicar.net:
2011/9/15 Pierre Joye pierre.php@gmail.com:
hi,
Should we delete these tests (and, maybe deprecate/move to pecl the
extension itself)?I don't think we should, they are here to make sure that the emulation
layer works fine.If not, I'd like to know how to run these tests.
Maybe the skipif is wrong, as far as I remember there was an issue
with seeing the "mhash" layer as being the mhash extension. Maybe we
should change the skipif and uses function_exists instead? Have you
tried it?They both return false for me:
conf@laptop ~/php-src/trunk $ sapi/cli/php -r
'var_dump(extension_loaded("mhash"), function_exists("mhash"));'
bool(false)
bool(false)
conf@laptop ~/php-src/trunk $Definitely works for me on latest trunk. Does a shorter configure fix this? I wonder if something elsewhere is breaking this.
macvicar-mba:trunk macvicar$ cat config.nice
#! /bin/shCreated by configure
'./configure'
'--disable-all'
'--with-mhash'
"$@"macvicar-mba:trunk macvicar$ sapi/cli/php -m
[PHP Modules]
Core
date
ereg
hash
mhash
pcre
Reflection
SPL
standard[Zend Modules]
macvicar-mba:trunk macvicar$ sapi/cli/php -r 'var_dump(extension_loaded("mhash"));'
bool(true)
--
Regards,
Shein Alexey