Bug or what?
| From: | EDB) | Date: | Mon, 12 Mar 2001 19:08:37 +0000 |
| Subject: | Bug or what? | ||
| Groups: | php.db php.general | ||
| Request: | Send a blank email to php-general+get-43517@lists.php.net to get a copy of this message | ||
First File - index.php
<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
if(empty($check)) {
$page = "index.php?check=1";
header("Location: $page");
setcookie("testcookie", "1");
}
else {
if(empty($testcookie)) {
echo ("<font face=arial size=4 color=red>Problem
detected!</font><br><br>" .
"<b>Your browser does not support cookies!</b><br><br>" .
"<font size=2>Enable cookies and try again.</font>");
die;
}
else {
$page = "login.php";
header("Location: $page");
}
}
?>
Second File - login.php
<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
?>
<html>
<head>
<title>Forecast Tool - ATL Key Account</title>
</head>
<body>
<form method="post" action="temp.php" name="form_login">
<table>
<tr><td><font size="2" face="Arial, Helvetica,
sans-serif">Login:</font></td>
<td><input type="text" name="login" size="8"
maxlength="8"><br></td></tr>
<tr><td><font size="2" face="Arial, Helvetica,
sans-serif">Password:</font></td>
<td><input type="password" name="senha" size="8"
maxlength="8"></td></tr>
<tr><td><input type="reset" name="botao"
value="Clear"></td>
<td><input type="submit" name="submit"
value="Login"></td></tr>
</table>
</form>
</body>
</html>
Everything works fine when I use these two files with Apache running on Solaris, RH, Windows 98,
Windows ME and Windows NT 4.0. The main objective is to test if the browser supports cookies of
course. But... If I use Microsoft IIS with these two files it never works! The cookie is NEVER sent
to the browser (this was verified using Netscape's option to warn about new cookies coming in)
and obviously I always receive the error message stating that my browser doesn't support
cookies! Impossible! The same application running on two different servers produces different
results? Is it a bug?
Thanks in advance!!!
Best regards,
Fábio Ottolini