From:             artem at osp dot ru
Operating system: Linux 2.2.25
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  ob_gzhandler make "Segmentation fault"

script from docs:
===========================
<?php
ob_start("ob_gzhandler");
?>
<html>
<body>
<p>This should be a compressed page.
</html>
<body>
==========================
make "Segmentation fault" for apache:
==========================
lynx -mime_header http://www2.osp.ru/~artem/t19.php

Looking up www2.osp.ru
Making HTTP connection to www2.osp.ru
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://www2.osp.ru/~artem/t19.php'
Alert!: Unable to access document.

lynx: Can't access startfile
==========================
script with ob_flush() work well:
==========================
<?php
ob_start("ob_gzhandler");
?>
<html>
<body>
<p>This should be a compressed page.
</html>
<body>
<?php
ob_flush();
?>
==========================
lynx -mime_header http://www2.osp.ru/~artem/t19-1.php

HTTP/1.1 200 OK
Date: Tue, 03 Jun 2003 14:18:06 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.2 mod_fastcgi/2.4.0
X-Powered-By: PHP/4.3.2
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=windows-1251

{gz-data}
==========================
php was configured:
./configure  --with-mysql=/opt/mysql --enable-track-vars --with-gd
--with-zlib-dir=/usr/lib/ --enable-memory-limit --enable-debug
--with-apache=../apache_1.3.27

apache was configured:
./configure \
"--prefix=/opt/www" \
"--enable-module=rewrite" \
"--enable-module=so" \
"--enable-module=headers" \
"--activate-module=src/modules/fastcgi/libfastcgi.a" \
"--activate-module=src/modules/php4/libphp4.a"

with version php 4.3.0
without ob_flush work fine, but with 
ob_flush there some other error:

lynx -mime_header http://www2.osp.ru/~artem/t19-1.php
HTTP/1.1 200 OK
Date: Tue, 03 Jun 2003 14:25:19 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.0 mod_fastcgi/2.4.0
X-Powered-By: PHP/4.3.0
Content-Encoding: gzip
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=windows-1251

{gz-data}<br />
<table border='1' cellspacing='0'>
<tr><td bgcolor='#ffbbbb' colspan="3"><b>Warning</b>: String is not
zero-termina
ted () (source:
/home/artem/download/php-4.3.0/Zend/zend_execute_API.c:289) in <
b>/volume2/1/home/artem/public_html/t19-1.php</b> on line <b>10</b><br />
<tr><th bgcolor='#aaaaaa' colspan='3'>Call Stack</th></tr>
<tr><th bgcolor='#cccccc'>#</th><th bgcolor='#cccccc'>Function</th><th
bgcolor='
#cccccc'>Location</th></tr>
<tr><td bgcolor='#ffffff' align='center'>1</td><td
bgcolor='#ffffff'>{main}()</t
d><td
bgcolor='#ffffff'>/volume2/1/home/artem/public_html/t19-1.php<b>:</b>0</td
></tr>
<tr><td bgcolor='#ffffff' align='center'>2</td><td bgcolor='#ffffff'><a
href='ht
tp://www.php.net/ob_flush' target='_new'>ob_flush</a>
()</td><td
bgcolor='#ffffff'>/volume2/1/home/artem/public_html/t19-1.php<b>:</b>
10</td></tr>
</table>

=============================

-- 
Edit bug report at http://bugs.php.net/?id=23985&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23985&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23985&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23985&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23985&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23985&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23985&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23985&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23985&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23985&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23985&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23985&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23985&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23985&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23985&r=gnused

Reply via email to