Documented bug in php 4.2.0/4.2.1 causes condition where only last cookie is set when using in conjunction with Apache 2.
Example:
After running this code:
Code: Select all
$lifetime = time() + 3600 * 24 * 365;
setcookie ("cookiea", "loo", $lifetime,"/");
setcookie ("cookieb", "foo", $lifetime,"/");
setcookie ("cookiec", "doo", $lifetime,"/");
Only cookiec would be set. cookiea and cookieb would NOT be set.
This condition prevented login on phpmac.com.
NEWS FLASH
This has been fixed, our php has been patched.
FIX HOW-TO
edit
ext/standard/head.c line 124
change
Code: Select all
return sapi_add_header(cookie, strlen(cookie), 0);
to
Code: Select all
return sapi_add_header_ex(cookie, strlen(cookie), 0, 0
TSRMLS_CC);
REFERENCES AND CREDIT
regina@hitel.net has provided the patch.
more information at
http://bugs.php.net/bug.php?id=16626