Jump to content


Photo

Warning: Cannot modify header information


  • Please log in to reply
4 replies to this topic

#1 DaveTomneyUK

DaveTomneyUK
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationUK, England

Posted 21 June 2006 - 12:19 PM

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

#2 gfX

gfX
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 21 June 2006 - 12:24 PM

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]

#3 DaveTomneyUK

DaveTomneyUK
  • Members
  • PipPip
  • Member
  • 13 posts
  • LocationUK, England

Posted 21 June 2006 - 12:27 PM

[!--quoteo(post=386362:date=Jun 21 2006, 01:24 PM:name=gfX)--][div class=\'quotetop\']QUOTE(gfX @ Jun 21 2006, 01:24 PM) View Post[/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.

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 21 June 2006 - 01:06 PM

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 no prior output to the browser.
Legend has it that reading the manual never killed anyone.
My site

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 June 2006 - 02:49 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users