php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23985 ob_gzhandler make "Segmentation fault"
Submitted: 2003-06-03 09:29 UTC Modified: 2003-06-05 03:53 UTC
From: artem at osp dot ru Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.2 OS: Linux 2.2.25
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 4 = ?
Subscribe to this entry?

 
 [2003-06-03 09:29 UTC] artem at osp dot ru
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>

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-05 01:02 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2003-06-05 03:16 UTC] artem at osp dot ru
backtrace:

[www2:/opt/www/bin]:1253# gdb /opt/www/bin/httpd.432
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /opt/www/bin/httpd.432 -X

Program received signal SIGSEGV, Segmentation fault.
0x342831 in add_stack_frame () from /usr/local/lib/php/modules/xdebug.so
(gdb) bt
#0  0x342831 in add_stack_frame () from /usr/local/lib/php/modules/xdebug.so
#1  0x342dd3 in xdebug_execute_internal ()
   from /usr/local/lib/php/modules/xdebug.so
#2  0x80bfe07 in call_user_function_ex (function_table=0x82a6ba0,
    object_pp=0x0, function_name=0x82f1e5c, retval_ptr_ptr=0xbfffedf0,
    param_count=2, params=0xbfffed98, no_separation=1, symbol_table=0x0)
    at /usr/local/src/php-4.3.2/Zend/zend_execute_API.c:586
#3  0x80adefe in php_end_ob_buffer (send_buffer=1 '\001', just_flush=0 '\000')
    at /usr/local/src/php-4.3.2/main/output.c:242
#4  0x80ae2af in php_end_ob_buffers (send_buffer=1 '\001')
    at /usr/local/src/php-4.3.2/main/output.c:336
#5  0x809dc9d in php_request_shutdown (dummy=0x0)
    at /usr/local/src/php-4.3.2/main/main.c:959
#6  0x80dd6e0 in apache_php_module_main (r=0x82e44a4, display_source_mode=0)
    at /usr/local/src/php-4.3.2/sapi/apache/sapi_apache.c:60
#7  0x8095bf4 in send_php ()
#8  0x8095c4d in send_parsed_php ()
#9  0x81a3be3 in ap_invoke_handler ()
#10 0x81b8b87 in process_request_internal ()
#11 0x81b8be8 in ap_process_request ()
#12 0x81afa05 in child_main ()
#13 0x81afbb0 in make_child ()
#14 0x81afd24 in startup_children ()
---Type <return> to continue, or q <return> to quit---
#15 0x81b039c in standalone_main ()
#16 0x81b0bff in main ()
#17 0x1eff31 in __libc_start_main (main=0x81b0858 <main>, argc=2,
    ubp_av=0xbffff7f4, init=0x8069ae4 <_init>, fini=0x81eb0b0 <_fini>,
    rtld_fini=0x11e274 <_dl_fini>, stack_end=0xbffff7ec)
    at ../sysdeps/generic/libc-start.c:129
(gdb)
 [2003-06-05 03:21 UTC] derick@php.net
Please do not load xdebug, or any other debugger when submitting a report but instead write the author of the debugger. (For xdebug you can write to me, derick@php.net).
I'm marking this as bogus, as it's not a bug in PHP itself.
 [2003-06-05 03:29 UTC] artem at osp dot ru
yes. problem with xdebug.
no xdebug - no Segmentation fault.
will work with derick@php.net
 [2003-06-05 03:53 UTC] artem at osp dot ru
Problem was with older release xdebug 1.1.0.
New release 1.2.0 not have this problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 20:01:30 2024 UTC