This was an IIS BUG !!!!! 
Developers of squirrelmail, pay attention:
There is a bug in IIS that doesn't set cookies when a redirection is done through cgi (php as thus).
(Read below for Micro$oft and php comments on this)
 
Solution is as follows:
Change in "redirect.php" the line which says:
***************************************
header("Location: $redirect_url");
***************************************
with
******************************************************************************
echo "<html><head>";
echo "<meta http-equiv='Refresh' content='0; url=""'>";
echo "</head><body></body></html>";
******************************************************************************
If anyone knows whether this should be posted in some bug or mod or whatever on the net, please do so.  It's important that anyone can be informed by this.
 
 
PHP manual::
soreman at abv dot bg
11-Apr-2003 04:26 
 If you experience problems on Microsoft Information Server (IIS) when setting a cookie via PHP and
when PHP is running as a CGI binary it is not setting the cookie. After spending many hours on what
the problem is here is what happens:
When you invoke setcookie and redirect to another page you will not have your cookie set, because
it seems that IIS doesn't set the cookie unless you actually send some contents to the browser.
Therefore if you want to set a cookie and then redirect to another page you will have to do the
redirection via _javascript_ and/or HTML if you want your script to work on IIS.
Microsoft::
When a CGI application sends a Set-Cookie header with "302 Object Moved" response and Location
header, Internet Information Server (IIS) ignores the cookie header.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Ruben Goethals
Sent: 25 June 2003 16:09
To: [EMAIL PROTECTED]
Subject: [SM-USERS] LOGIN problem, $key not retained in cookie

When I set debug to true, I get:
******************************
Bad request: LOGIN invalid command argument

Read data:
*************************************
************
Also, when doing an echo $key in webmail.php, I get an empty string, while echo $key in redirect.php gives me a couple of charachters (which correctly translates to the encrypted password).
 
How come this variable is not retained ?  Probably cookie, but my settings of IE allow ALL cookies.. Why aren't they created ?  ANd they aren't because I checked in my cookie directory.... Hmmm....
Is this because of the IP-address URL ?  Surely not ?
 
DOes anyone has any idea ?  Thanks
 
url ="" 192.168.1.210/webmail   (= INTERNAL LAN address)
I use Lotus Domino IMAP server
Webserver IIS

Reply via email to