Reputation: 379
This type of question is already asked before
Codeigniter: headers already sent error
CodeIgniter headers already sent error with different Server
Codeigniter - Cannot modify header information - headers already sent by
Codeigniter: Message: Cannot modify header information - headers already sent by (output started at
http://ellislab.com/forums/viewthread/69280/#468283
Codeigniter: Message: Cannot modify header information - headers already sent by (output started at
Exact Error I am Getting
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home2/hanomart/public_html/ClickMyStay/application/controllers/welcome.php:472)
Filename: libraries/Session.php
Line Number: 675
What i am doing at welcome.php:472 Line
I am changing a session value like as below
$value="Some Value";
$session_data=array("hotel_search_value" => $value);
$this->session->set_userdata($session_data);
I have tried in below ways.
before <?php and after ?>
(Everything is fine.No white spaces).But those things didnt solve my problem.
Can anyone help me out in this issue.
Thanks in advance,
Sree ram
Upvotes: 0
Views: 3876
Reputation: 8385
Turn off all echo()
ing and var_dump()
ing before line 472.
Headers are sent whenever is something echo()
ed out so session library can not modify sessions in that point and it triggers error.
Upvotes: 3