Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter: Message: Cannot modify header information - headers already sent by (output started at [duplicate]

I have created a dynamic menu CMS website. I developed in a Windows system. When i run my project in windows operating system, My project runs without any error. But now uploaded it into Linux Operating system server i am getting warning & error like:

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /home/ansofcm8/public_html/apps/resources/math/application/core/MY_Controller.php:1)

    Filename: libraries/Session.php

    Line Number: 675

What could be the reason. Please help me.

like image 877
Dan Avatar asked Apr 12 '13 15:04

Dan


1 Answers

There seems to be whitespace before the php open tag <?php in MY_Controller.php.

Check all PHP files and remove the whitespace before the <?php tag. If there is a space or new line, the body of the http request is started, and you can't add new headers to the http request.

like image 71
JackPoint Avatar answered Nov 18 '22 10:11

JackPoint