Edit report at https://bugs.php.net/bug.php?id=51166&edit=1
ID: 51166 Comment by: ali dot zahedi1371 at gmail dot com Reported by: chethan dot com at gmail dot com Summary: arning: Cannot modify header information - headers already sent by (output sta Status: Not a bug Type: Bug Package: PHP options/info functions Operating System: windowsxp PHP Version: 5.3.1 Block user comment: N Private report: N New Comment: what is the slotion of this warning Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\tamrin.php:11) in C:\xampp\htdocs\tamrin.php on line 13 ???? Previous Comments: ------------------------------------------------------------------------ [2010-02-27 13:19:32] ahar...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Please re-read the documentation for setcookie(), which notes that you can't send any output before calling it. ------------------------------------------------------------------------ [2010-02-27 13:05:43] chethan dot com at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=51166&edit=1