Re: cookie + ie5

From: Date: Fri, 15 Dec 2000 07:44:38 +0000
Subject: Re: cookie + ie5
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-30467@lists.php.net to get a copy of this message
Hi Richard, Toby, Sorry its not the [ and ] and its also not renePR The strange thing is ITS working with NETSCAPE all the times ITS working with IEXPLORER for most of the times BUT sometimes in IE5 the cookie is just not set at all (yes on the same station where it works well other times ) strange but true andreas ----- Original Message ----- From: "Toby Butzon" <php-lists@imawebdesigner.com> To: "Richard Lynch" <richard@zend.com>; <php-general@lists.php.net> Sent: Friday, December 15, 2000 2:53 AM Subject: Re: [PHP] cookie + ie5 > Really? The PHP manual suggests that that's a completely acceptible way to > create cookies... see > http://php.net/manual/function.setcookie.php > > Otherwise, it seems to work for me... > > One thing though, > str_replace(".","",$REMOTE_ADDR) + "renePR" > probably doesn't have the behavior you'd expect. "renePR" is typecasted to > an int because of the + and it ends up being 0. Try replacing it with this: > str_replace(".","",$REMOTE_ADDR) . "renePR" > > Toby Butzon > [ criticism spurs improvement ] > > > ----- Original Message ----- > From: "Richard Lynch" <richard@zend.com> > To: <php-general@lists.php.net> > Sent: Thursday, December 14, 2000 8:24 PM > Subject: Re: [PHP] cookie + ie5 > > > : Because [ and ] are not valid characters in a Cookie name. > : > : ----- Original Message ----- > : From: "andre" <viva@mcnon.com> > : Newsgroups: php.general > : Sent: Thursday, December 14, 2000 8:51 AM > : Subject: [PHP] cookie + ie5 > : > : > : hi, > : > : can someone tell me why this cookie isnt set in ie 5 > : > : > : ======================================= > : > : <? > : if($myName && $myCode) { > : > : $myLoginOK=0; > : if ((trim($myName) == "rene") && (trim($myCode) == "rs#t2")) > : {$myLoginOK=1;}; > : > : if ($myLoginOK == 1) { > : // md5en der ip + "renePR" > : $iceberg_temp = md5(str_replace(".","",$REMOTE_ADDR) + > "renePR"); > : setcookie("myTicket[myICEBERG]",$iceberg_temp,time()+600,"/"); > : echo "<html><head><title>VIVA - Online</title>"; > : echo "<meta http-equiv=\"refresh\" > content=\"0;URL=doaz.php3\">"; > : echo "</head>"; > : echo "<body bgcolor=\"#FFFFFF\" >"; > : } > : else { > : echo "<html><title>VIVA - Online</title>"; > : echo "<body bgcolor=\"#FFFFFF\" >"; > : include("no_login.tpl"); > : } > : } else > : > : > : echo "<html><title>VIVA - Online</title>"; > : echo "<body bgcolor=\"#FFFFFF\" >"; > : > : include ("login.tpl"); > : } > : > : echo "</body></html>"; > : > : ?> > : > : ============================================== > : > : > : its working fine with netscape all versions > : > : its working fine from a apache server on a redhat 6.2 box > : > : but its strange on a cobald raq3 > : > : > : any ideas ? > : > : > : > : thanks > : > : andreas > : > : > : > : > : -- > : PHP General Mailing List (http://www.php.net/) > : To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > : For additional commands, e-mail: php-general-help@lists.php.net > : To contact the list administrators, e-mail: php-list-admin@lists.php.net > : > : > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#30467) next »