![]() |
Cannot modify header information - headers already sent - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cannot modify header information - headers already sent (/showthread.php?tid=41173) Pages:
1
2
|
Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent Filename: helpers/my_userExel_helper.php Line Number: 489 Hi buddy most of the time i found above error Can someone give me appropriate solution for it. Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]toopay[/eluser] Post the line 489 of your exel helper. Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] [quote author="toopay" date="1304166589"]Post the line 489 of your exel helper.[/quote] On all these lines same error error comes 486 Code: header("Content-type: application/zip"); Code: header("Content-Disposition: attachment; filename=$archive_file_name"); Code: header("Pragma: no-cache"); Code: header("Expires: 0"); Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]toopay[/eluser] put this, right BEFORE line 486 : Code: if(headers_sent($from, $line)) die ('Headers were already sent at : '.$from.' on line : '.$line); Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] I got this output : Headers were already sent at : on line : 0 Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] [quote author="Sudhakar Prajapati" date="1304168206"]I got this output : Headers were already sent at : on line : 0[/quote] Here is my code Code: ob_start(); What i am missing? Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] Please help me,no one is there? Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]toopay[/eluser] ob_end_clean() does discard headers! any buffers will have already been sent out to the client. Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]Sudz[/eluser] [quote author="toopay" date="1304178642"]ob_end_clean() does discard headers! any buffers will have already been sent out to the client.[/quote] Then Instead of ob_end_clean() what can i use? I use that to clear buffer after reading buffer contents, Is there any another alternative. Cannot modify header information - headers already sent - El Forum - 04-30-2011 [eluser]toopay[/eluser] try ob_end_flush() instead ob_end_clean() |