note 90347 added to function.setcookie

From: Date: Fri, 17 Apr 2009 08:04:35 +0000
Subject: note 90347 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-153422@lists.php.net to get a copy of this message
Beware, the example below works fine on my testing server but didn't work on my providers server; setcookie("SessionID","a test cookie"); Once the cookie is set my entire web site fails with messages similar to. "An appropriate representation of the requested resource could not be found on this server." I'd used similar code for years on another site, but where the value was numeric, I'd made a minor change to generate a random string for the session ID and then got this issue. The solution is not to use the cookie name "SessionID", i.e. setcookie("SessionToken","a test cookie"); works fine. ---- Server IP: 92.48.74.199 Probable Submitter: 213.2.151.60 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- https://master.php.net/note/edit/90347 Del: integrated -- https://master.php.net/note/delete/90347/integrated Del: useless -- https://master.php.net/note/delete/90347/useless Del: bad code -- https://master.php.net/note/delete/90347/bad+code Del: spam -- https://master.php.net/note/delete/90347/spam Del: non-english -- https://master.php.net/note/delete/90347/non-english Del: in docs -- https://master.php.net/note/delete/90347/in+docs Del: other reasons-- https://master.php.net/note/delete/90347 Reject -- https://master.php.net/note/reject/90347 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153422) next »