Codeigniter - cannot change header information - headers already sent

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
#

A strange part of it, the session.php file is missing in the library folder

+5
source share
8 answers

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 look like

output_buffering = On
+6
source

Delete print_r (); in the controller, model, or session. There are problems or warnings when loading a website to a host server that does not alert in localhost

+3
source

, php .

+3

, php

+3

<?php. .

(output started at /home/aphotel/public_html/application/config/config.php:1)
+3

PHP   "ob_start();"   CI      "ob_start();" //

+3

"UTF-8 " php , , .

+2

.

$autoload['libraries'] = array('session', 'encrypt', 'database',...
+2

All Articles