Re: SAPI/CGI and error_log()
| From: | derick@php.net | Date: | Wed, 28 Aug 2002 20:07:56 +0000 |
| Subject: | Re: SAPI/CGI and error_log() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87579@lists.php.net to get a copy of this message | ||
On Wed, 28 Aug 2002, Marcus Börger wrote:
> At 16:31 28.08.2002, Sebastian Bergmann wrote:
> > Current HEAD causes browsers to "download" instead of "showing"
> > scripts
> > that call error_log() inside an output buffer, when using SAPI/CGI.
> >
> > Reproducing script:
> >
> > <?php
> > ob_start();
> > error_log('test');
> > ?>
>
> As a quick answer i tried this with sapi/mo_apache and it works as expected.
With latest CVS:
[root@kossu php-4.3.0dev]# ./php > /tmp/1 2> /tmp/2
<?php
ob_start();
error_log('test');
?>
[root@kossu php-4.3.0dev]# cat /tmp/1
Status: 200
X-Powered-By: PHP/4.3.0-dev
Content-type: text/html
as you can see there is an extra \r\n:
[root@kossu php-4.3.0dev]# hexdump -c /tmp/1
0000000 S t a t u s : 2 0 0 \r \n X - P
0000010 o w e r e d - B y : P H P / 4
0000020 . 3 . 0 - d e v \r \n \r \n C o n t
0000030 e n t - t y p e : t e x t / h
0000040 t m l \r \n
0000045
regards,
Derick
---------------------------------------------------------------------------
Did I help you? http://www.derickrethans.nl/link.php?url=giftlist
Frequent ranting: http://www.derickrethans.nl/
---------------------------------------------------------------------------
PHP: Scripting the Web - derick@php.net
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---------------------------------------------------------------------------