Welcome Guest, Not a member yet? Register   Sign In
Error explanation and how do I correct it?
#1

[eluser]The Mask[/eluser]
Hi

Does anybody know what this means?

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /customers/mysite.com/mysite.com/httpd.www/system/application/libraries/My_Controller.php:23)

Filename: libraries/Session.php

Line Number: 662


This is the contents of My-Controller:
class My_Controller extends Controller
{
var $base_url = '';
var $data = array();

function My_Controller()
{
parent :: Controller();
$this->data[ 'member' ] = '';
$this->data[ 'message' ] = '';
$this->data[ 'base_url' ] = base_url();
}

function index()
{
}

}

Thanks
#2

[eluser]The Mask[/eluser]
It's ok, I found the problem.

It was whitespace after the <?php ?>.
#3

[eluser]gunzour[/eluser]
Take a look at line 23 of your My_Controller.php -- something is generating output. Maybe you are closing your php tags and have additional whitespace after?
#4

[eluser]TheFuzzy0ne[/eluser]
You're encouraged to completely omit the closing PHP tag. It won't cause any problems with the parser, and it might save you a headache in future.




Theme © iAndrew 2016 - Forum software by © MyBB