next up previous contents
Next: 部分信件中文寄信者及主題不見 Up: 更新版本 Previous: 版本說明   Contents

hex2bin

  1. 查紀錄出現以下錯誤:
    [Mon Mar 07 09:20:26 2016] [error] [client 36.232.158.80] PHP Fatal error:
    Cannot redeclare hex2bin() in
    /usr/share/squirrelmail/plugins/mail_fetch/functions.php on line 104
    
  2. 解決方式:將函數名稱 hex2bin 改為 convertHex2bin。
    [root@mail www]# diff -uN
    squirrelmail-1.4.22.bak/plugins/mail_fetch/functions.php
    squirrelmail-1.4.22/plugins/mail_fetch/functions.php 
    --- squirrelmail-1.4.22.bak/plugins/mail_fetch/functions.php	2011-01-06
    10:44:03.000000000 +0800
    +++ squirrelmail-1.4.22/plugins/mail_fetch/functions.php	2016-03-07
    08:37:08.136952950 +0800
    @@ -92,7 +92,8 @@
         return '';
     }
     
    -function hex2bin( $data ) {
    +#function hex2bin( $data ) {
    +function convertHex2bin( $data ) {
         /* Original code by josh@superfork.com */
     
         $len = strlen($data);
    @@ -136,7 +137,8 @@
     }
     
     function decrypt( $txt ) {
    -    $txt = mf_keyED( hex2bin( $txt ) );
    +    #$txt = mf_keyED( hex2bin( $txt ) );
    +    $txt = mf_keyED( convertHex2bin( $txt ) );
         $tmp = '';
         for ( $i=0; $i < strlen( $txt ); $i++ ) {
             $md5 = substr( $txt, $i, 1 );
    



2016-03-11