|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-06-03 02:38 UTC] shane@php.net
[2003-06-09 08:43 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
I'm running php as CGI API and register globals and i'm trying the following script: <?php $something = $_GET["something"]; $value = "this is a value"; if (!setcookie ("TestCookie", $value)) { print ("cookie NOT set!"); } else { print ("cookie set!"); } ?> with the following outputs: 1. www.server.com/script.php?something= outputs: 'cookie set!' 2. www.server.com/script.php outputs: 'cookie NOT set!' 3. www.server.com/script.php?somehting=value outputs: 'cookie set!' 4. www.server.com/script.php?something_else= outputs: 'cookie NOT set!' so if I try to read a variable (can be GET/COOKIE/POST/...) and it is not explicitly specified, even if it's empty, cookies can't be set anymore. I think it has to do with being a CGI API, because on another server where it's installed as apache API I don't have this problem. can anyone verify this?