Jump to content

Header Location Problem


ConfusedCODER79

Recommended Posts

:confused:

Hi!

I'm not a very experienced PHPer.

 

I keep getting this error...

Warning: Cannot modify header information - headers already sent by (output started at /home/content/j/2/6/j26183102/html/referral.php:11) in /home/content/j/2/6/j26183102/html/referral.php on line 295

 

Any suggestions? It works on one server but not my customers godaddy hosting site.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/217011-header-location-problem/
Share on other sites

The very first thing in that script is html markup. That markup unconditionally gets sent to the browser immediately when the script loads. Any attempt to send any headers after that will fail and generate that error.

The error message tells you where the OUTPUT is occurring AT (or where the end of the output is at) that is causing the problem. Fixing this would involve eliminating that output or changing the logic to move the statement using a header() so that it is before any output is sent.

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.