Saving cookies

From: Date: Sun, 12 Apr 2026 00:49:02 +0000
Subject: Saving cookies
Groups: php.general 
Request: Send a blank email to php-general+get-328811@lists.php.net to get a copy of this message
hi, I've spent HOURS on this & its driving me nuts... i understand that if you set a cookie & it fails, it fails silently.. (no errors) Is there a way to force an error if it fails ? - Fog horn, Siren blast, a cannon - "here is an error" Basically, If i set a cookie in a 3-4 line test script, the cookie is set, no problems.. but do it in my main script, and it fails every time... One culprit is that headers already sent will not allow cookies to be sent. Ive got this at the top of my included script, as well as IMMEDIATELy before the cookie is set if (headers_sent($file, $line)) { echo "<pre>HEADERS ALREADY SENT at $file:$line</pre>"; exit; } However no errors located... Is there a guaranteed way that i can find the reason for cookies to fail being set ? -- Gordon.

« previous php.general (#328811) next »