note 106054 added to function.setcookie

From: Date: Thu, 06 Oct 2011 07:09:58 +0000
Subject: note 106054 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-183657@lists.php.net to get a copy of this message
Internet Explorer 8 and Internet Explorer 9 (IE8 and IE9) are still not accepting cookies from localhost. The simplest way around this is adding an entry to your hosts file e.g. 127.0.0.1 www.mytestsite.com Another pitfall that caught me twice now : The system time on one of my virtual machines sometimes starts lagging behind (because no time synchronization is set up). When defining the cookie lifetime with time()+3600, the timestamp will be in the past compared to host machine and IE and Chrome will just ignore the cookie. So check your server time if for some reason setcookie doesn't seem to work on IE or Chrome... ---- Server IP: 61.195.146.164 Probable Submitter: 180.1.91.25 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- https://master.php.net/note/edit/106054 Del: integrated -- https://master.php.net/note/delete/106054/integrated Del: useless -- https://master.php.net/note/delete/106054/useless Del: bad code -- https://master.php.net/note/delete/106054/bad+code Del: spam -- https://master.php.net/note/delete/106054/spam Del: non-english -- https://master.php.net/note/delete/106054/non-english Del: in docs -- https://master.php.net/note/delete/106054/in+docs Del: other reasons-- https://master.php.net/note/delete/106054 Reject -- https://master.php.net/note/reject/106054 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183657) next »