|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32301 PHP hangs during decompression
Submitted: 2005-03-14 14:42 UTC Modified: 2005-09-11 01:00 UTC
Avg. Score:4.6 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ralph at cs dot cf dot ac dot uk Assigned:
Status: No Feedback Package: Zlib related
PHP Version: 5CVS-2005-03-30 OS: MacOS X 10.3.x
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-03-14 14:42 UTC] ralph at cs dot cf dot ac dot uk
Running the following compression / decompression code 
on MacOS X results in php hanging, and control never 
being retuyrned to the user.

One particular side effect is that doing
sudo pear upgrade-all
does not install the upgrades and hangs. However, this 
problem appears to be in php itself, not pear.

Reproduce code:
$fd = gzopen('temp.gz', 'wb9');
for ($i=0; $i<5000; $i++)
  gzwrite($fd, "hello world !");

$fd = gzopen('temp.gz', 'rb');
while (strlen($v_binary_data = gzread($fd, 512)) != 0) {
echo "OK Done !";

Expected result:
OK Done!

on completion.

Actual result:
Never returns.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-18 19:31 UTC]
2nd try:

(for your convinience I removed the url for the win32 binaries..*SIGH*)

There's nothing wrong with the snapshot, I checked it myself.

 [2005-03-30 15:45 UTC] ralph at cs dot cf dot ac dot uk
Have tried this with 

Bug is still present.
 [2005-09-02 08:53 UTC]
Please try using this CVS snapshot:
For Windows:

And don't invent your own PHP versions. The version string in the bug reports must start with a NUMBER..

 [2005-09-02 10:08 UTC] ralph at cs dot cf dot ac dot uk
Hmm. there is something odd going on here.

This snapshot does solve the problem on MacOS X 10.4.2 for 
the test case reported.

However, the original source of the problem was when 
installing stuff with PEAR, and that STILL does NOT work.

E.g.  sudo pear install Image_Barcode
downloading Image_Barcode-1.0.4.tgz ...
Starting to download Image_Barcode-1.0.4.tgz (13,150 bytes)
.....done: 13,150 bytes

Hangs, processor running flat out, until aborted with CTRL-

Before, after a long discussion with the PEAR folks, they 
produced the test case reported here to show it was not a 
PEAR bug.

Unfortunately, the fix so far seems to fix the test case, 
but not the real problem to be addressed!
 [2005-09-02 10:36 UTC]
So you need to come up with a better test script..

 [2005-09-02 10:39 UTC] ralph at cs dot cf dot ac dot uk
New test:

sudo pear install Image_Barcode
 [2005-09-03 01:58 UTC]
What I meant with better script is a standalone and short script which has nothing to do with PEAR.
 [2005-09-11 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 12:01:31 2024 UTC