ID: 27009 Comment by: keymone at gmail dot com Reported By: ronan at ronanmcnulty dot co dot uk Status: No Feedback Bug Type: mcrypt related Operating System: winxp PHP Version: 4.3.4 New Comment:
Windows 2003 Server SP1 PHP 4.3.2 this line crashes Apache/1.3.24 $bar = mcrypt_ecb(MCRYPT_RIJNDAEL_128 , 'foo', $bar, MCRYPT_DECRYPT); Previous Comments: ------------------------------------------------------------------------ [2004-07-08 21:54:33] danielpm8 at hotmail dot com 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>"; } ------------------------------------------------------------------------ [2004-01-31 23:15:59] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2004-01-22 14:03:46] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2004-01-22 13:47:30] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27009&edit=1