ID:               21569
 User updated by:  [EMAIL PROTECTED]
-Summary:          PHP can't set cookies after a test with an unset
                   variable
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Windows 2000 only
 PHP Version:      4.3.0
 New Comment:

[EMAIL PROTECTED]: 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.


Previous Comments:
------------------------------------------------------------------------

[2003-01-13 19:42:29] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------

[2003-01-13 16:47:53] [EMAIL PROTECTED]

Why does it affect only Windows 2000, while the very same PHP version
with the same php.ini file works fine on Windows 98 ?  And it works
fine on Linux too?

To make it clearer, the "workarounds" are needed only if the scripts
run under Windows 2000, so that the example script returns "1" on
Windows 2000 and "3" on Windows 98 or Linux.

------------------------------------------------------------------------

[2003-01-13 16:37:48] [EMAIL PROTECTED]

There's really no bug here. You're getting a notice about unitialized
variable which causes the rest of the headers not to get send. Try
adding 'error_reporting(0);' in the beginning of your script..


------------------------------------------------------------------------

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

Reply via email to