CodeIgniter Forums
Cannot modify header information? - 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? (/showthread.php?tid=22781)



Cannot modify header information? - El Forum - 09-20-2009

[eluser]Unknown[/eluser]
Error Code :
Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\xxx\apps\adminapp\libraries\Template.php:59)

Filename: helpers/url_helper.php

Line Number: 541

controller code :
Code:
function insert()
{
$this->categories_model->insert(
array(
'CategoryName' => $this->input->post('CategoryName'),
'CategorySeo' => $this->seo->getSeoName($this->input->post('CategoryName')),
'CategoryDesc' => $this->input->post('CategoryDesc'),
'CategoryKeyword ' => $this->input->post('CategoryKeyword')
)
);
redirect('categories');
}

Anyone could help me resolve this?

Thank you.


Cannot modify header information? - El Forum - 09-20-2009

[eluser]cahva[/eluser]
As the error suggests, you probably have outputted something in the Template library at C:\xampp\htdocs\xxx\apps\adminapp\libraries\Template.php

Check that file that you dont have any white space, new lines etc. And be sure that you dont end the library with ?>. Thats usually the problem that there is php end tag but after that there is some empty lines after that(thus resulting that header error).


Cannot modify header information? - El Forum - 09-20-2009

[eluser]Unknown[/eluser]
[quote author="cahva" date="1253472816"]As the error suggests, you probably have outputted something in the Template library at C:\xampp\htdocs\xxx\apps\adminapp\libraries\Template.php

Check that file that you dont have any white space, new lines etc. And be sure that you dont end the library with ?>. Thats usually the problem that there is php end tag but after that there is some empty lines after that(thus resulting that header error).[/quote]

Very Thanks...