Re: Bug #12036: Error compiling if there is blank line before <?php
| From: | Chris Vandomelen | Date: | Wed, 11 Jul 2001 07:53:12 +0000 |
| Subject: | Re: Bug #12036: Error compiling if there is blank line before <?php | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-59659@lists.php.net to get a copy of this message | ||
> 3. Lets add session feature
> -----------------------
>
> <?php
> session_start();
> print "bla..bla..";
> ?>
> -----------------------
> Ops.. we got an error here... !!!
That's not a bug.
session_start() wants to send a cookie to the client. But if output has
already started (the blank line before '<?php' caused output to be
started), the session cookie can't be sent, nor can the cache limiter. So
you'll get an error because it can't send headers as it wants to.
Chris