php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: james at jamesreno dot com
New email:
PHP Version: OS:

 

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

Test script:
---------------
<?
 $zip = new ZipArchive();
 $zip->open("/tmp/test.zip",ZIPARCHIVE::CREATE);
 $zip->addFromString("test.txt","This is a test");
 $zip->close();
 unset($zip);

 $zip2 = new ZipArchive();
 $zip->open("/tmp/test.zip");
 $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...

Patches

Pull Requests

History

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] laruence@php.net
-Status: Open +Status: Feedback
 [2012-04-22 04:30 UTC] laruence@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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php 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 
anymore.
   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!

Regards,
~James
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 04:01:29 2024 UTC