From: chethan dot com at gmail dot com Operating system: windowsxp PHP version: 5.3.1 PHP Bug Type: PHP options/info functions Bug description: arning: Cannot modify header information - headers already sent by (output sta
Description: ------------ <html> <head> <title>cookie</title> </head> <body> <?php setcookie('test',45,time()+(60*60*24*7)); ?> </body> </html> my firefox , ie8 and chrome displays Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php_sandbox\cookies.php:7) in C:\wamp\www\php_sandbox\cookies.php on line 8 please help......... Reproduce code: --------------- --- >From manual page: http://www.php.net/function.setcookie --- <html> <head> <title>cookie</title> </head> <body> <?php setcookie('test',45,time()+(60*60*24*7)); ?> </body> </html> Actual result: -------------- warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php_sandbox\cookies.php:7) in C:\wamp\www\php_sandbox\cookies.php on line 8 -- Edit bug report at http://bugs.php.net/?id=51166&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51166&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51166&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51166&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51166&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51166&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51166&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51166&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51166&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51166&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51166&r=support Expected behavior: http://bugs.php.net/fix.php?id=51166&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51166&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51166&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51166&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51166&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51166&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51166&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51166&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51166&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51166&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51166&r=mysqlcfg