#22013 [NEW]: setcookie does not work on Mozilla

2003-02-02 Thread frankkim
From: [EMAIL PROTECTED]
Operating system: Windows
PHP version:  4.3.0
PHP Bug Type: Session related
Bug description:  setcookie does not work on Mozilla 

Today I upgraded from PHP 4.2.2 to PHP 4.3.  I am using Apache 2.0.43 on
Windows with PHP CGI.

After doing this upgrade, setcookie() stopped working for me using Mozilla
1.3a though it continued to work using IE.  setcookie() was working for me
with both browsers before the upgrade.

Here is a script that illustrates the bug.

id, $expirationTime, '/', $domain, 0)) {
  $success = false;
}
if (!setCookie(USERNAME, $this->username, $expirationTime, '/', $domain,
0)) {
  $success = false;
}

if ($success) {
  print "setCookie's succeeded";
} else {
  print "setCookie's failed";
}

?>

-- 
Edit bug report at http://bugs.php.net/?id=22013&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22013&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22013&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22013&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22013&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22013&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22013&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22013&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22013&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22013&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22013&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22013&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22013&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22013&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22013&r=gnused




#22013 [Fbk->Opn]: setcookie does not work on Mozilla

2003-02-02 Thread frankkim
 ID:   22013
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: HTTP related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

I added:

error_reporting(E_ALL);

to the script and saw no errors reported.

This was not surprising since I have this set in php.ini:

error_reporting  = E_ALL; display all errors, warnings and notices
display_errors = On


Previous Comments:


[2003-02-02 12:57:55] [EMAIL PROTECTED]

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.


your script contains errors: $this is not an object.

Add:
error_reporting(E_ALL);

in line 1 to see if there's anything else reported.




[2003-02-02 12:35:33] [EMAIL PROTECTED]

Today I upgraded from PHP 4.2.2 to PHP 4.3.  I am using Apache 2.0.43
on Windows with PHP CGI.

After doing this upgrade, setcookie() stopped working for me using
Mozilla 1.3a though it continued to work using IE.  setcookie() was
working for me with both browsers before the upgrade.

Here is a script that illustrates the bug.

id, $expirationTime, '/', $domain, 0)) {
  $success = false;
}
if (!setCookie(USERNAME, $this->username, $expirationTime, '/',
$domain, 0)) {
  $success = false;
}

if ($success) {
  print "setCookie's succeeded";
} else {
  print "setCookie's failed";
}

?>





-- 
Edit this bug report at http://bugs.php.net/?id=22013&edit=1




#22013 [Opn]: setcookie does not work on Mozilla

2003-02-02 Thread frankkim
 ID:   22013
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: HTTP related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

By the way, my original test script was kind of stupid.  Here is the
corrected test script.




Previous Comments:


[2003-02-02 13:15:13] [EMAIL PROTECTED]

I added:

error_reporting(E_ALL);

to the script and saw no errors reported.

This was not surprising since I have this set in php.ini:

error_reporting  = E_ALL; display all errors, warnings and notices
display_errors = On



[2003-02-02 12:57:55] [EMAIL PROTECTED]

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.


your script contains errors: $this is not an object.

Add:
error_reporting(E_ALL);

in line 1 to see if there's anything else reported.




[2003-02-02 12:35:33] [EMAIL PROTECTED]

Today I upgraded from PHP 4.2.2 to PHP 4.3.  I am using Apache 2.0.43
on Windows with PHP CGI.

After doing this upgrade, setcookie() stopped working for me using
Mozilla 1.3a though it continued to work using IE.  setcookie() was
working for me with both browsers before the upgrade.

Here is a script that illustrates the bug.

id, $expirationTime, '/', $domain, 0)) {
  $success = false;
}
if (!setCookie(USERNAME, $this->username, $expirationTime, '/',
$domain, 0)) {
  $success = false;
}

if ($success) {
  print "setCookie's succeeded";
} else {
  print "setCookie's failed";
}

?>





-- 
Edit this bug report at http://bugs.php.net/?id=22013&edit=1




#22013 [Opn]: setcookie does not work on Mozilla

2003-02-02 Thread frankkim
 ID:   22013
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: HTTP related
 Operating System: Windows
 PHP Version:  4.3.0
 New Comment:

$domain is 'localhost' because I am testing on my local
machine.

I updated the script to not pass the $domain and $expirationTime to the
setCookie function and the script now works.

I am not sure why 'localhost' would be a problem since I see when I
take out $domain and $expirationTime, Mozilla sets
the host for the cookie to 'localhost'.  Maybe this is a Mozilla bug.


Previous Comments:


[2003-02-02 13:38:17] [EMAIL PROTECTED]

Please confirm that HTTP_HOST exists (i.e. what $domain is)



[2003-02-02 13:16:18] [EMAIL PROTECTED]

By the way, my original test script was kind of stupid.  Here is the
corrected test script.





[2003-02-02 13:15:13] [EMAIL PROTECTED]

I added:

error_reporting(E_ALL);

to the script and saw no errors reported.

This was not surprising since I have this set in php.ini:

error_reporting  = E_ALL; display all errors, warnings and notices
display_errors = On



[2003-02-02 12:57:55] [EMAIL PROTECTED]

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.


your script contains errors: $this is not an object.

Add:
error_reporting(E_ALL);

in line 1 to see if there's anything else reported.




[2003-02-02 12:35:33] [EMAIL PROTECTED]

Today I upgraded from PHP 4.2.2 to PHP 4.3.  I am using Apache 2.0.43
on Windows with PHP CGI.

After doing this upgrade, setcookie() stopped working for me using
Mozilla 1.3a though it continued to work using IE.  setcookie() was
working for me with both browsers before the upgrade.

Here is a script that illustrates the bug.

id, $expirationTime, '/', $domain, 0)) {
  $success = false;
}
if (!setCookie(USERNAME, $this->username, $expirationTime, '/',
$domain, 0)) {
  $success = false;
}

if ($success) {
  print "setCookie's succeeded";
} else {
  print "setCookie's failed";
}

?>





-- 
Edit this bug report at http://bugs.php.net/?id=22013&edit=1