Re: Please help document headers_sent()
| From: | nicos@php.net | Date: | Thu, 07 Nov 2002 00:16:54 +0000 |
| Subject: | Re: Please help document headers_sent() | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-90592@lists.php.net to get a copy of this message | ||
Anyway to get a gdb backtrace please?
--
M.CHAILLAN Nicolas
nicos@php.net
www.WorldAKT.com Hébergement de sites internets.
"Philip Olson" <philip@cornado.com> a écrit dans le message de news:
Pine.BSF.4.10.10211062357420.70669-100000@localhost...
>
> I get a Segmentation fault with this script using
> PHP CLI:
>
> <?php
> headers_sent($file, $line);
> ?>
> philip@rock:~$ php test.php
> Segmentation fault
>
> That's when no headers are sent before the call. But if
> headers are sent beforehand, it works:
>
> <?php
> print "foo\n";
> headers_sent($file, $line);
> print "$file : $line\n";
> ?>
> philip@rock:~$ php test.php
> foo
> test.php : 2
>
> With a fairly (a few weeks old) version of PHP CLI.
> I am unable to do further tests at this time, in fact,
> I am unable to build HEAD (it dies). Only CLI seems
> to be affected, CGI works either way. Haven't
> tested mod.
>
> Regards,
> Philip Olson
>
> P.s. If no headers were sent, in CGI, $line gets
> the value int 0. $file is an empty string.
>
>
>
>
> On Wed, 6 Nov 2002, Philip Olson wrote:
>
> >
> > > On Wed, 6 Nov 2002, Wez Furlong wrote:
> > > if (headers_sent($file, $line)) {
> > > echo "headers were sent by $file:$line";
> > > }
> > [snip]
> >
> > Hello Wez-
> >
> > Ahh, that makes sense. I was a little off
> > base on that one! :) Will add an example now.
> >
> > Regards,
> > Philip
> >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>