ID: 23893 Updated by: [EMAIL PROTECTED] Reported By: info at splendense dot nl -Status: Open +Status: Feedback Bug Type: CGI related Operating System: sunOS PHP Version: 4.3.2 New Comment:
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. unable to repro on apache/cgi/win32 with 4.2.3, 4.3.2 or CVS. Perhaps you should consider (warnings were breaking setting the cookie for me): <?php if (isset($_GET["something"])) $something = $_GET["something"]; $value = "this is a value"; if (!setcookie ("TestCookie", $value)) { print ("cookie NOT set!"); } else { print ("cookie set!"); } ?> Otherwise, you need to provide more details on configuration of your system. Previous Comments: ------------------------------------------------------------------------ [2003-05-30 05:05:27] info at splendense dot nl 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? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23893&edit=1
