Reputation: 51
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/aphotel/public_html/application/config/config.php:1)
Filename: libraries/Session.php
Line Number: 366
#
Weird part of it, there is no session.php file in libraries folder
Upvotes: 5
Views: 34191
Reputation: 1641
In PHP Use " ob_start(); " at first line and in CI controller constructor at first line " ob_start(); " //output buffer
Upvotes: 8
Reputation: 63
Just load session library first.
$autoload['libraries'] = array('session', 'encrypt', 'database',...
Upvotes: 2
Reputation: 1786
I changed encoding to 'UTF-8 without BOM' for all php files in model, controller and helper folders and that helped.
Upvotes: 3
Reputation: 926
There is space before the <?php
tag in the below file. I have seen this issue multiple times.
(output started at /home/aphotel/public_html/application/config/config.php:1)
Upvotes: 4
Reputation: 131
I had this problem before and it was caused by output_buffering was Off.
Edit your php.ini and search for output_buffering and make it looks like this
output_buffering = On
Upvotes: 9
Reputation: 1027
Make sure you do not have any white space characters before the opening php tag in your controller class.
Upvotes: 4
Reputation: 41
Remove print_r(); in controller, model or session. There are problem or warning when website upload in host server not warning in localhost
Upvotes: 4