Jump to content

Warning: Cannot modify header information


DaveTomneyUK

Recommended Posts

Hi,

Does anyone know how to fix this stupid bug I keep getting I have made 2 files for affiliates and links but ever time someone clicks a link they get this stupid error.

Warning: Cannot modify header information - headers already sent by (output started at /home/linux/w/user/htdocs/inc/meta.php:6) in /home/linux/w/user/htdocs/inc/functions/functions.php on line 33
Link to comment
https://forums.phpfreaks.com/topic/12533-warning-cannot-modify-header-information/
Share on other sites

Check in functions.php for any whitespace or characters after your closing PHP tag. Check for returns, etc. This is usually what causes that problem.

More info: [a href=\"http://forums.phpcoin.com/index.php?showtopic=1629\" target=\"_blank\"]http://forums.phpcoin.com/index.php?showtopic=1629[/a]
[!--quoteo(post=386362:date=Jun 21 2006, 01:24 PM:name=gfX)--][div class=\'quotetop\']QUOTE(gfX @ Jun 21 2006, 01:24 PM) [snapback]386362[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Check in functions.php for any whitespace or characters after your closing PHP tag. Check for returns, etc. This is usually what causes that problem.

More info: [a href=\"http://forums.phpcoin.com/index.php?showtopic=1629\" target=\"_blank\"]http://forums.phpcoin.com/index.php?showtopic=1629[/a]
[/quote]

Thats what I cannot work out it runs perfect on my localhost but if I upload it to my website it wont run right.
I'm surprised that you can run 'that' locally without any error. Perhaps it's non-identical code/scripts.

Anyway - the reason for the error is exactly what the message says. Header will only work if there has been [b]no prior output to the browser[/b].
The error is comming from meta.php on line 6 this where the output has started so look at lines 4 - 8 in meta.php

Hava a read of this [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95562\" target=\"_blank\"]thread[/a] . It'll help you understand why you are getting this error message.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.