PDA

View Full Version : weird headers already sent error


CraigR
08-12-2010, 04:09 PM
I have a site which i have uploaded to my testing server, and all is well.

I have just posted the pages onto my clients server and am getting a headers already sent error...

Warning: Cannot modify header information - headers already sent by (output started at /path/pagename.php:61)

which doesn't occur on my testing server.

it seems to occur due to the update or cancel button on my insert form doing a redirect, but there is nothing being sent to the page beforehand.

This is a time critical issue, and I am at loss as to why it is occuring.

Grateful for any advice

Jason Byrnes
08-12-2010, 05:27 PM
the clue to look for is in this part of the error message:
output started at /path/pagename.php:61


this is saying the problem is at line 60 or 60 (it usually reports 1 line after the problem) of the pagename.php page.


to be able to investigate the cause, I would need to see a copy of the page. If you could send a copy of the page, it would help us in trouble shooting.

CraigR
08-12-2010, 05:34 PM
what i find particularly confusing is that it doesn't occur on my local server or my hosting server, just my clients server.

UPDATE ** staring me in the face was a space between my php tags**,

issue is resolved, but i don't know why it didn't occur on my local server.??

Jason Byrnes
08-13-2010, 06:34 AM
your local server may be set to lower error reporting level

error_reporting(E_ALL ^ E_WARNING);

would show all error types, except warnings.

CraigR
08-13-2010, 07:47 AM
Hi Jason.

can I change my php.ini on my local machine to set this ?

Jason Byrnes
08-13-2010, 08:08 AM
yes, look for the error reporting setting in the php.ini.