PHP 4.0 Bug #9163 Updated: mcrypt_list_algorithms doesn't work

From: Date: Wed, 07 Feb 2001 21:36:24 +0000
Subject: PHP 4.0 Bug #9163 Updated: mcrypt_list_algorithms doesn't work
Groups: php.dev 
Request: Send a blank email to php-dev+get-45991@lists.php.net to get a copy of this message
ID: 9163 Updated by: derick Reported By: rusty@socrates.berkeley.edu Status: Feedback Bug Type: mcrypt related Assigned To: Comments: mcrypt mcrypt support enabled version 2.4.x Supported ciphers none Supported modes none Directive Local Value Master Value mcrypt.algorithms_dir /usr/local/lib/libmcrypt /usr/local/lib/libmcrypt mcrypt.modes_dir /usr/local/lib/libmcrypt /usr/local/lib/libmcrypt It looks like there are no modules installed in these dirs, what is the content of these directories, and is this path in your ld.so.conf ? (Please use the bugsystem to answer the question) Previous Comments: --------------------------------------------------------------------------- [2001-02-07 16:14:35] derick@php.net IN which are your modules and to which parameter are the directories set in php.ini ? It would be nice if you could add a link to the output of a phpinfo(); to this report too. --------------------------------------------------------------------------- [2001-02-07 16:09:48] rusty@socrates.berkeley.edu I'm using libmcrypt-2.4.8. Compiled everything with gcc-2.95.2. Here is the sample script. Everything works except the mcrypt_list_algorithms() and mcrypt_list_modes() at the end. They both generate the error "Warning: No algorithms found in module dir in /grunt_a/apache/htdocs/grunt/idrive/test1.php on line 34" <script language="php"> if (mcrypt_module_self_test(MCRYPT_DES) == FALSE) { echo "mcrypt_module_self_test(MCRYPT_DES) failed<br>"; } else { echo "mcrypt_module_self_test(MCRYPT_DES) passed<br>"; } $key = "the password is: xyzzy"; $input = "encrypt this, sucker"; $td = mcrypt_module_open(MCRYPT_DES, "", MCRYPT_MODE_CBC, ""); $ivs = mcrypt_enc_get_iv_size($td); $iv = mcrypt_create_iv($ivs, MCRYPT_RAND); mcrypt_generic_init($td, $key, $iv); if (mcrypt_enc_self_test($td)) { echo "mcrypt_enc_self_test() failed<br>"; } $enc = mcrypt_generic($td, $input); echo "encrypted data: " . bin2hex($enc) . "<br>"; $dec = mdecrypt_generic($td, $enc); echo "decrypted data: " . $dec . "<br>"; echo "algorithm: " . mcrypt_enc_get_algorithms_name($td) . "<br>"; echo "mode: " . mcrypt_enc_get_modes_name($td) . "<br>"; echo "block size: " . mcrypt_enc_get_block_size($td) . "<br>"; echo "key size: " . mcrypt_enc_get_key_size($td) . "<br>"; $algs = mcrypt_list_algorithms(); $mods = mcrypt_list_modes(); mcrypt_generic_end($td) </script> --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9163&edit=2

« previous php.dev (#45991) next »