I setup SquirrelMail a few days ago on a Debian Sarge box and immediately
had problems. When I tried to send, delete, check mail, etc. It would do
what it was suppose to, but would error out on the redirect because it was
sending me to an http page instead of https.
After googling and checking the archives, I ended up with these
possibilities: a bad apache config; php needs to be updated; or a bug in
SquirrelMail. For myself, I don't think it is my apache config (my setup
is very simple and I've been running apache servers for many years), my
php is up-to-date, so I followed a possible bug in SM.
>From my view point, there seems to be a bug in the function get_location
in functions/strings.php. I created a temp fix which has been working fine
that last few days. It works for me using SM 1.4.4 and should work on
1.5.1 since the function has not changed. I have no immediate plans to
debug the function because this fix will work fine for me.
Use at your own risk. I suggest pasting the following patch into a file
called strings.php.patch. Check to be sure none of the lines got wrapped,
there are 33 lines total. Place that file in the functions directory of
wherever you keep your SM, for my Debian Sarge its
/usr/share/squirrelmail/functions. Backup your strings.php file, then run:
patch -u strings.php strings.php.patch
I suggest restarting apache after patching, though it might not be needed.
Good luck.
Michael
--- strings.php.orig 2005-03-09 23:08:35.299382448 -1000
+++ strings.php 2005-03-09 23:23:35.448538976 -1000
@@ -208,9 +208,30 @@
$path = php_self();
}
$path = substr($path, 0, strrpos($path, '/'));
+
+/**MDB
+ * Replaced with a temporary fix until the function can be debugged.
+ * Code kept for future upgrade diffs.
+ */
+/*
if ( sqgetGlobalVar('sq_base_url', $full_url, SQ_SESSION) ) {
return $full_url . $path;
}
+*/
+
+/**MDB
+ * This temp fix is only as good as your apache config. Make sure your
+ * SSLEngine is ON for each VirtualHost or Site. If your https is running
+ * on another port, then change '443' to that port #.
+ */
+ sqgetGlobalVar('SERVER_PORT', $server_port, SQ_SERVER);
+ $server_proto = ($server_port == '443' ? 'https://' : 'http://');
+ sqgetGlobalVar('HTTP_HOST', $http_host, SQ_SERVER);
+ return $server_proto . $http_host . $path;
+
+/**MDB
+ * Nothing will get executed past this point.
+ */
/* Check if this is a HTTPS or regular HTTP request. */
$proto = 'http://';
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
--
squirrelmail-users mailing list
Posting Guidelines:
http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: [email protected]
List Archives:
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id)95
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users