|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-22 13:47 UTC] ronan at ronanmcnulty dot co dot uk
Description: ------------ When I use the example: mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT); Apache crashes: szAppName : Apache.exe szAppVer : 0.0.0.0 szModName : libmcrypt.dll szModVer : 0.0.0.0 offset : 00022685 Reproduce code: --------------- mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT); Expected result: ---------------- I expect apache NOT to crash! Actual result: -------------- Apache actually crashes PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
Hi, I am experiencing this problem also. When I run mcrypt_decrypt it causes apache to crash. However, mcrypt_encrypt is working fine. I have Mcrypt module loaded as a dynamic module on apache. I am using Windows XP professional, apache 1.3 and php 4.3.4 . The mcrypt dll library is a "libmcrypt + php 4.3.x on windows". The following is the example code I used, which causes apache to crash. If you any questions or suggestions please do not hesitate to contact me. Thanks in advance. Cheers, Daniel ================================== Example code ================================ example6_encrypt(); function example6_encrypt(){ $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $key = "This is a very secret key"; $text = "Meet me at 11 o'clock behind the monument."; //echo strlen($text) . "\n"; $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv); //echo strlen($crypttext) . "\n"; echo "<p>encrypted string: <b>$crypttext</b></p>"; example6_decrypt($crypttext); } /* string mcrypt_decrypt ( string cipher, string key, string data, string mode [, string iv]) */ function example6_decrypt($text){ $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $key = "This is a very secret key"; $decrypt_text = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv); echo "<p>decrypted string: <b>$decrypt_text</b></p>"; }