--- Chris Hayes <[EMAIL PROTECTED]> wrote:
> At 15:33 19/02/03, you wrote:
> >I have a script which adds header information to a different page, on my 
> >server I get a Cannot add header information - headers already sent by. 
> >But on other servers it works fine, does any1 know why??
> 
> Are you sure you did not edit a file?
> 
> Take care that there is not __any__ output before the header() command. The 
> error message you got gives you an indication where the output starts. Have 
> a close look at that line.
> 
> Remove all spaces and enters in the PHP files before <?  or after  ?>.
> 
> An error message before this error message is also output, for which PHP 
> creates headers.

That last point is important. It is often likely that PHP is causing the
output, because you have an error somewhere (and it's outputting the error
message). If this script works elsewhere, perhaps you are using a function that
your current PHP is not compiled with.

So, for starters, place an exit just before your header:

exit;
header(...);

This way, the redirect will not happen, and if there is output, you will see it
on the screen. Get rid of it, whatever it is. :-)

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to