#21569 [Bgs]: PHP can't set cookies (setcookie) after invoking an unset variable
| From: | ElfQrin at ElfQrin dot com | Date: | Tue, 14 Jan 2003 09:31:16 +0000 |
| Subject: | #21569 [Bgs]: PHP can't set cookies (setcookie) after invoking an unset variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-29978@lists.php.net to get a copy of this message | ||
ID: 21569
User updated by: ElfQrin@ElfQrin.com
Reported By: ElfQrin@ElfQrin.com
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows
PHP Version: 4.3.0
New Comment:
error log:
[Tue Jan 14 10:25:13 2003] [error] [client 127.0.0.1] PHP Notice:
Undefined variable: test in C:\Data\htdocs\cbtest\index.php on line 4
[Tue Jan 14 10:25:13 2003] [error] [client 127.0.0.1] PHP Warning:
Cannot modify header information - headers already sent in
C:\Data\htdocs\cbtest\index.php on line 4
[Tue Jan 14 10:25:13 2003] [error] [client 127.0.0.1] PHP Warning:
Cannot modify header information - headers already sent in
C:\Data\htdocs\cbtest\index.php on line 5
Previous Comments:
------------------------------------------------------------------------
[2003-01-14 03:29:43] ElfQrin@ElfQrin.com
I'm very sorry. I've checked the Windows 98 configuration and it turned
out to have PHP 4.2.1 installed. When I've upgraded to PHP 4.3.0 the
problem occurred.
May be it started from v4.2.2
More info to come.
------------------------------------------------------------------------
[2003-01-14 02:53:40] ElfQrin@ElfQrin.com
msopacua@php.net: I'm not the only one who experienced this problem.
Actually I've started to investigate when two different persons told me
they couldn't keep users logged in that web engine.
It has been reproduced on Windows 2000 with Apache 1.3.27, 2.0.35,
2.0.43 and PHP 4.2.2, 4.2.3, 4.3.0
However I'll provide more detailed information about ini files and
possible error logs.
------------------------------------------------------------------------
[2003-01-13 19:42:29] msopacua@php.net
Can't reproduce it.
Are you sure the php.ini that is actually read (see phpinfo()) is
EXACTLY the same?
Look into error_reporting and display_errors specifically.
If so, what are these settings? Is there anything related in the
apache/php error log?
------------------------------------------------------------------------
[2003-01-13 17:28:03] ElfQrin@ElfQrin.com
Just because of the OS.
I know how cookies work.
Actually I've noticed it while working on a web engine that couldn't
keep user logged *only* when it ran on a Windows 2000/Apache/PHP/MySQL
server so I decided to investigate.
------------------------------------------------------------------------
[2003-01-13 17:22:42] msopacua@php.net
Does it work on those other machines, because you already have accepted
cookies, or because they run another OS?
Please make sure you understand how cookies work, specifically, that
they are only 'visible at the next page'.
Also make sure you don't have some automated blocking in effect for the
Windows 2000 machine, by verifying with plain telnet, if the
'SetCookie: ' header is sent rather than trusting the browser.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21569
--
Edit this bug report at http://bugs.php.net/?id=21569&edit=1