RE: [PHP-WIN] Headers Already Sent - How To Overcome????
| From: | Vail, Warren | Date: | Thu, 04 Nov 2004 03:50:28 +0000 |
| Subject: | RE: [PHP-WIN] Headers Already Sent - How To Overcome???? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24881@lists.php.net to get a copy of this message | ||
Any "echo" or "print" statements executed prior to executing the header
statement (such as displaying variables for debugging) will cause this to
occur. The line number mentioned in the warning message should tell you
which statement actually produced output prior to the header (if there are
several, you may have to eliminate them one at a time). Another common
cause is switching to html mode ?> where even blank lines will generate
output prior to the header statement.
Hth,
Warren Vail
-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of MikeA
Sent: Wednesday, November 03, 2004 3:21 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Headers Already Sent - How To Overcome????
I am trying to do the following
header ("Location: wlserver/index.php?userKey=$userKey&show=$userKey");
but I keep getting
Warning: Cannot modify header information - headers already sent by ...
The code on the header line above is not executing so I am assuming the
previous headers being sent is causing this command to not execute. Part of
the problem is that I am modifying software written by someone else to fit
my needs. I do not want to make a lot of alterations because I don't want
to pull my hair out when the next release shows up.
Is there a command or someway to get around this problem without hacking out
all of the other header sending code?
I appreciate any help.
Thank you.
Mike
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php