View Issue Details

IDProjectCategoryView StatusLast Update
0000151PHP for OS/2, ArcaOS & eComStation (PHP versions v8.x v7.x v5.x)public2008-06-20 09:36
ReporterDungeonwatcher Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Summary0000151: PHP 5.2.1: Module mcrypt.dll does not function
DescriptionHi my big master! :-)

I am of use this module to encode from PNs in my forum phpBB 2.0.22.

Unfortunately, the module mcrypt.dll in the version PHP 5.2.1 does not function there. Neither old PNs are correctly deciphered, nor new PNs are encoded or afterwards deciphered. However, the module of PHP 5.2.0b2 also functions in PHP 5.2.1.
Additional InformationThis is my used code:

==============================================================================
if ($encrypt)
{
    $cipher_alg = MCRYPT_RIJNDAEL_256;
    $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";
    $encrypted_message = str_replace("\\\"", "\"", $privmsg_message);
    $encrypted_message = str_replace("\\'", "'", $encrypted_message);
    $encrypted_message = str_replace("\\\\", "\\", $encrypted_message);
    $encrypted_message = bin2hex(mcrypt_encrypt($cipher_alg, $encryption_key, $encrypted_message, MCRYPT_MODE_CFB, "$iv"));
    $encrypted_message = wordwrap($encrypted_message, 80, "
", 1);
    $encrypted_message = "Um diese verschlüsselte Nachricht zu lesen, gebe das Passwort unten rechts ein und klicke dann auf den Button \"Nachricht entschlüsseln\":\n\n" . $encrypted_message;
    $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text)
        VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . $encrypted_message . "')";
}
==============================================================================

==============================================================================
if ( $decrypt )
{
    $cipher_alg = MCRYPT_RIJNDAEL_256;
    $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";
    $decrypted_message = str_replace("Um diese verschlüsselte Nachricht zu lesen, gebe das Passwort unten rechts ein und klicke dann auf den Button \"Nachricht entschlüsseln\":\n\n", "", $private_message);
    $decrypted_message = str_replace("
", "", $decrypted_message);
    $decrypted_message = trim(mcrypt_decrypt($cipher_alg, $encryption_key, pack("H*", $decrypted_message), MCRYPT_MODE_CFB, "$iv"));
    $private_message = str_replace("\r\n", "
", $decrypted_message);
    $decrypted_message = str_replace("\"", "\"", $decrypted_message);
}
==============================================================================
TagsNo tags attached.

Activities

Dungeonwatcher

2007-05-07 16:11

reporter   ~0000607

Hi big master! :-)

Unfortunately, this module also does not act in the version 5.2.2 function. There is no error message. It is not simply encoded correctly or is deciphered. In PHP 5.2.0 the module there functions very well.

Bye/2

psmedley

2007-05-11 03:16

administrator   ~0000609

Sorry for the delay - things have been VERY busy here - is there any output in the PHP error log?

Dungeonwatcher

2007-05-11 05:19

reporter   ~0000610

Hi!

No problem. :-)

This is confused this what me so much. There is no error message, nothing. Only the result of the encoding or decoding is wrong. :-\

psmedley

2007-05-11 05:22

administrator   ~0000611

Do you have some simple standalone PHP code to show the problem to help me debug it?

psmedley

2007-08-07 09:46

administrator   ~0000699

Is this ok now in 5.2.3r2?

Dungeonwatcher

2007-08-12 08:20

reporter   ~0000715

Hi of big masters!

I cannot test this any more. I have run over approx. 3 weeks ago in the hostile camp Windows. %-)

Sorry and thank you for your brilliant work.

Bye

psmedley

2008-06-20 09:36

administrator   ~0000884

User cannot test - so can't confirm if this is fixed or not :/

Issue History

Date Modified Username Field Change
2007-02-11 18:58 Dungeonwatcher New Issue
2007-05-07 16:11 Dungeonwatcher Note Added: 0000607
2007-05-11 03:16 psmedley Note Added: 0000609
2007-05-11 05:19 Dungeonwatcher Note Added: 0000610
2007-05-11 05:22 psmedley Note Added: 0000611
2007-08-07 09:46 psmedley Note Added: 0000699
2007-08-12 08:20 Dungeonwatcher Note Added: 0000715
2008-06-20 09:36 psmedley Status new => closed
2008-06-20 09:36 psmedley Note Added: 0000884
2008-06-20 09:36 psmedley Resolution open => no change required