Re: SAPI/CGI and error_log()
| From: | (Marcus Börger) | Date: | Wed, 28 Aug 2002 20:18:04 +0000 |
| Subject: | Re: SAPI/CGI and error_log() | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87582@lists.php.net to get a copy of this message | ||
Results with yesturdays sources:
mod_php:
HTTP/1.1 200 OK
Date: Wed, 28 Aug 2002 20:15:26 GMT
Server: Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4mdk) mod_auth_pgsql/0.9.9 mod_ssl/2.8.7 OpenSSL/0.9.6c PHP/4.3.0-dev
X-Powered-By: PHP/4.3.0-dev
Connection: close
Content-Type: text/html
cgi without server:
[marcus@zaphod sebastian-bergmann]$ /usr/src/php4/php error-log.php
Status: 200
Content-type: text/html
X-Powered-By: PHP/4.3.0-dev
Building mod_php again with todays changes
At 22:07 28.08.2002, derick@php.net wrote:
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: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<?php ob_start(); error_log('test'); ?>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 / 40000020 . 3 . 0 - d e v \r \n \r \n C o n t0000030 e n t - t y p e : t e x t / h0000040 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---------------------------------------------------------------------------