note 85523 added to function.setcookie

From: Date: Wed, 03 Sep 2008 21:49:14 +0000
Subject: note 85523 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-144127@lists.php.net to get a copy of this message
Platform: Windows XP SP2, IIS5.2, Php5.2.5: I've had my share of sessioning problems and all of them came from the fact that i'm using Php Designer 2007 as my php editor.. Cookies must be sent before any output from your script including <html> and <head> tags as well as any whitespaces, well this php editor was sending a sort of data before the headers that i want to send which cause to have the given error: "Cannot send session Cookie - headers already sent", even after using output buffers to fixe the problem of the time the cookies are sent i still had the same problem. Solution? Don't use any editor..! notepad is all you need... Used notepad, and it worked like magic! ---- Server IP: 217.160.72.57 Probable Submitter: 217.151.224.29 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- https://master.php.net/note/edit/85523 Del: integrated -- https://master.php.net/note/delete/85523/integrated Del: useless -- https://master.php.net/note/delete/85523/useless Del: bad code -- https://master.php.net/note/delete/85523/bad+code Del: spam -- https://master.php.net/note/delete/85523/spam Del: non-english -- https://master.php.net/note/delete/85523/non-english Del: in docs -- https://master.php.net/note/delete/85523/in+docs Del: other reasons-- https://master.php.net/note/delete/85523 Reject -- https://master.php.net/note/reject/85523 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144127) next »