In case somebody will try to install SquirrelMail 1.5.1, there are two
issues with it:

1) PHP Fatal error:  Call to undefined function session_unregister() in
/usr/share/squirrelmail/functions/global.php on line 111

2) PHP Fatal error:  Cannot redeclare hex2bin() in
/usr/share/squirrelmail/plugins/mail_fetch/functions.php on line 309

Attached patches solve these problems.

Also after installation one need to pickup sqspell_config.php from
latest stable (e.g. 1.4.23) to make aspell dictionaries working.

I personally need 1.5.1 to be able to STARTTLS for IMAP/SMTP server.
Otherwise PLAIN authentication is forbidden.
--- /usr/share/squirrelmail/functions/global.php.orig   2006-07-08 
21:01:27.000000000 +0200
+++ /usr/share/squirrelmail/functions/global.php        2012-12-19 
22:27:47.433789672 +0100
@@ -92,9 +92,9 @@
 
     sqsession_is_active();
 
-    $_SESSION["$name"] = $var;
+    session_start();
 
-    session_register("$name");
+    $_SESSION["$name"] = $var;
 }
 
 /**
@@ -107,8 +107,6 @@
     sqsession_is_active();
 
     unset($_SESSION[$name]);
-
-    session_unregister("$name");
 }
 
 /**
--- /usr/share/squirrelmail/plugins/mail_fetch/functions.php.orig       
2006-07-08 21:09:31.000000000 +0200
+++ /usr/share/squirrelmail/plugins/mail_fetch/functions.php    2012-12-19 
22:32:26.273782351 +0100
@@ -293,21 +293,6 @@
 }
 // end of hooked functions
 
-/**
- * hex2bin - document me
- */
-function hex2bin( $data ) {
-
-    /* Original code by j...@superfork.com */
-
-    $len = strlen($data);
-    $newdata = '';
-    for( $i=0; $i < $len; $i += 2 ) {
-        $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) );
-    }
-    return $newdata;
-}
-
 function mf_keyED( $txt ) {
 
     global $MF_TIT;

Reply via email to