We had NASTY problems with cookies on different servers. I've even seen code
work on one linux/apache machine and not another. This is usually due to the 
fact that the server's clock is off from the browsers clock (or vice versus)
and the browser sees that the cookie has passed and destroys it without setting
it.

--Joe

On Mon, Mar 12, 2001 at 01:08:37PM -0600, Fabio Ottolini (EDB) wrote:
> 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
-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.geekshare.com http://www.care2.com http://www.miester.org        /\\
"Those who can, create. Those who can't, complain."                        _\_V
-------------------------------------------------------------------------------


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to