[Kde-games-devel] Re: games.kde.org

Ladislav Strojil Ladislav.Strojil at seznam.cz
Wed Apr 23 19:17:29 CEST 2003


On Wednesday 23 of April 2003 18:05, Albert Astals Cid wrote:
> A Dimecres 23 Abril 2003 14:32, Andreas Beckermann va escriure:
> > On Tuesday 22 April 2003 23:35, Albert Astals Cid wrote:
> > > I think it may be because of the two empty lines of the end of
> > > games.inc file, could you try deleting them?
> >
> > I've just fixed my own system (php had been broken for some time) and
> > could therefore test your fix locally.
> > It seems to be working - I committed to cvs, I hope the problem will be
> > gone then. Thanks a lot!
> >
> > Do you know why this happened?
>
> I'm not sure at 100%. But if you look at the error
>
> "Warning: Cannot add header information - headers already sent by (output
> started at /local/www/kde/kdegames/games.inc:9) in
> /local/www/kde/media/includes/header.inc on line 18"
>
> It seems to mean that the output of the page to the user's browser had
> started at games.inc line 9 and so it could not change header information
> in header.inc line 18 (because this line is after games.inc).
>
> So i suppose apache, php or whatever was interpreting the two empty lines
> at the end of games.inc as if it should send to the browser 2 empty lines
> of plain html.

Anything that is outside of PHP tags (even whitespace) is sent to output 
"as-is". 
Therefore blank line or even single space before the opening tag (<?php) 
starts the output and you cannot send any headers afterwards (newer versions 
of PHP support buffered output, so this is less of an issue).

Cheers,
Lada

-- 
    ~       Ladislav Strojil, MFF UK
  ' v '               
 //   \\              
/(     )\    Powered by Penguin.
  ^ ' ^



More information about the kde-games-devel mailing list