|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61783 ZipArchive::getStream() crashes php-fcgi (5.3.10)
Submitted: 2012-04-20 09:08 UTC Modified: 2012-05-01 02:27 UTC
From: james at jamesreno dot com Assigned:
Status: Closed Package: Zip Related
PHP Version: 5.3.10 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: james at jamesreno dot com
New email:
PHP Version: OS:


 [2012-04-20 09:08 UTC] james at jamesreno dot com
When php is running in fcgi mode ZipArchive::getStream() causes PHP to crash.

Test script:
 $zip = new ZipArchive();
 $zip->addFromString("test.txt","This is a test");

 $zip2 = new ZipArchive();
 $fd = $zip->getStream("test.txt");  // CRASH

Expected result:
Zip to return file handle.

Actual result:
PHP Crashes (webserver reports *498 recv() failed (104: Connection reset by peer) 
while reading response header from upstream) and returns 502 Bad Gateway...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-20 09:14 UTC] james at jamesreno dot com
the second two $zip->'s should have been $zip2->'s :( sorry its late (5am)...
 [2012-04-22 04:30 UTC]
-Status: Open +Status: Feedback
 [2012-04-22 04:30 UTC]
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 for *NIX and for Win32

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.

 [2012-04-29 17:27 UTC] reeze dot xia at gmail dot com
I ever reproduce it in 5.3.10 but only several times. I can't reproduce it 
   Can you provide more information about the bug? or try lastest version?
 [2012-05-01 02:26 UTC] james at jamesreno dot com
This does seem to be fixed in PHP 5.3.11 - it no longer crashes however :( now 
dba_fetch() crashes --- yay. On to another bug fixing fiesta!

 [2012-05-01 02:27 UTC] james at jamesreno dot com
-Status: Feedback +Status: Closed
 [2012-05-01 02:27 UTC] james at jamesreno dot com
Fixed in PHP 5.3.11 (no longer crashes).
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 25 15:03:37 2022 UTC