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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.