Re: Warning: Cannot modify header information - headers already sent by - classic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
Header just be modified if its at the start of your script...

right code:
<?php
...
header();
...
?>

and not..
<?php
...
?>
<php
header();
?>

Valentine

On Thu, May 19, 2011 at 9:45 PM, Marc Guay <marc.guay@xxxxxxxxx> wrote:

> Hi folks,
>
> I'm running some code locally which should produce this fun error we
> all know and love:  Warning: Cannot modify header information -
> headers already sent by... but does not.  Switching from 5.3 to 5.2
> reveals the error and running it on another server with 5.2 also shows
> the error.  I don't believe the version has anything to do with it,
> but who knows.  I set error_reporting = E_ALL | E_STRICT and verified
> that display_errors = On, still nothing.  Any ideas what could be
> allowing a header('Location:'); call to redirect without throwing an
> error after output has been sent to the browser?
>
> Marc
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux