From: stephan dot schulze at kapthon dot com Operating system: Centos 5.3 PHP version: 5.2.9 PHP Bug Type: HTTP related Bug description: Cookie not set after setting cookie in .htaccess
Description: ------------ setcookie does not set a cookie when a cookie is set in .htaccess file first I do not know whether this is a bug or expected behaviour Reproduce code: --------------- .htaccess Code ============== <FilesMatch "\.(html|htm|xml|txt|php)$"> SetEnvIf Cookie "^.*testcookie.*$" cookie_set=1 Header set Set-Cookie: "testcookie=1; path=/;" env=!cookie_set </FilesMatch> Cookie is set here PHP-Code ======== setcookie('testphp', 'test_' . time()); in index.php => cookie is not set Expected result: ---------------- "testcookie" AND "testphp"-Cookie should be set Actual result: -------------- Only "testcookie" is set,any calls to setcookie does not set any cookie at all -- Edit bug report at http://bugs.php.net/?id=48243&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48243&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48243&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48243&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48243&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48243&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48243&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48243&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48243&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48243&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48243&r=support Expected behavior: http://bugs.php.net/fix.php?id=48243&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48243&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48243&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48243&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48243&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48243&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48243&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48243&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48243&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48243&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48243&r=mysqlcfg