php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6088 Output buffering breaks head requests
Submitted: 2000-08-10 21:19 UTC Modified: 2000-11-02 07:07 UTC
From: lwillis at plus dot net dot uk Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.2 OS: SunOS xxxx 5.7 Generic_106541-11
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lwillis at plus dot net dot uk
New email:
PHP Version: OS:

 

 [2000-08-10 21:19 UTC] lwillis at plus dot net dot uk
Turning output buffering ON causes Apache to go into an
infinite loop swallowing CPU time when it receives a HEAD
request, client receives no output (Not even HTTP headers).
Same server, same code works fine with output_buffering off.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-10 22:35 UTC] lwillis at plus dot net dot uk
Maybe realted to bug #5649?   Cannot reproduce this problem
on a Linux box with otherwise identical config. Can't  debug
further at the moment. If it would help I may be able to at
some point, but it is starting to sound like a Solaris-only
issue ...


 [2000-08-14 05:48 UTC] lwillis at plus dot net dot uk
Solaris specific problem, httpd gets stuck consuming CPU in
a longjmp call, I believe inside zend_bailout?. Confirmed
identical to bug #5649 which has detailed debug output.
 [2000-09-21 00:23 UTC] lwillis at plus dot net dot uk
Problem still persists with version 4.0.2

HEAD request still gives a hung httpd process and no output.

Stack dump from hung process:

(gdb) where
#0  php_ub_body_write (str=0x25cd00 "", str_length=0) at output.c:332
#1  0x92c88 in php_ob_send () at output.c:253
#2  0x926cc in php_end_ob_buffer (send_buffer=1) at output.c:120
#3  0x92700 in php_end_ob_buffers (send_buffer=1) at output.c:133
#4  0xb7450 in apache_php_module_main (r=0x0, display_source_mode=0) at sapi_apache.c:93
#5  0x339e0 in send_php ()
#6  0x33a24 in send_parsed_php ()
#7  0x10cf3c in ap_invoke_handler ()
#8  0x129110 in process_request_internal ()
#9  0x129628 in ap_internal_redirect ()
#10 0xfc9a8 in handle_dir ()
#11 0x10cf3c in ap_invoke_handler ()
#12 0x129110 in process_request_internal ()
#13 0x129190 in ap_process_request ()
#14 0x11ce4c in child_main ()
#15 0x11d1a4 in make_child ()
#16 0x11d2b4 in startup_children ()
#17 0x11db98 in standalone_main ()
#18 0x11e744 in main ()


PHP error log reports:
Maximum execution time of 30 seconds exceeded in xxx at line 405:

Line 405 of the file concerned is an "exit" statement. ie. the PHP script has finished running but the httpd process never finishes running, instead chewing CPU and returning no info, not even Headers.

 [2000-11-02 07:07 UTC] zeev@php.net
This is fixed in the latest CVS.

Thanks for the bug report, sorry for the slow response time!
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Jul 09 11:00:01 2026 UTC