#39231 [Opn->Fbk]: Problem with reading of .ZIP file content
| From: | pajoye@php.net | Date: | Mon, 23 Oct 2006 12:49:53 +0000 |
| Subject: | #39231 [Opn->Fbk]: Problem with reading of .ZIP file content | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103909@lists.php.net to get a copy of this message | ||
ID: 39231
Updated by: pajoye@php.net
Reported By: lajbr at seznam dot cz
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Windows 2003 Server
PHP Version: 5.1.6
Assigned To: pajoye
New Comment:
I still need a Zip file to reproduce your problem.
Previous Comments:
------------------------------------------------------------------------
[2006-10-23 12:46:12] lajbr at seznam dot cz
I tried to use the latest snapshot from mentioned link but with the
same result. In PHP 5.2-latest there is the same problem like in PHP
5.1.6 and 5.1.4.
------------------------------------------------------------------------
[2006-10-23 12:39:09] pajoye@php.net
Also which Zip extension do you use? (See phpinfo, $id and version).
If the problem persists with 5.2.0 or a recent version (get the latest
DLLs on http://pecl4win.php.net), please provide a link to the
zip file
you use in this test.
------------------------------------------------------------------------
[2006-10-23 09:21:01] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-10-23 09:13:24] lajbr at seznam dot cz
Description:
------------
I found a serious problem on PHP 5.1.6 (5.1.4 too). I try to read
content of .ZIP file (part of code is added below). I open an existing
ZIP file and I want to read its content. But Warning message with
following text is appeared (text is added below). The same problem
occured when I use function zip_close(). As the result nothing is
happened (no content from ZIP file is readed). When I go back to PHP
version 5.0.5 then all works fine.
Reproduce code:
---------------
function ziplist($zipfile){
$retval = array();
if ($sourcezip = @zip_open($zipfile)) {
while ($zip_entry = zip_read($sourcezip)) {
array_push($retval,array('filename' =>
zip_entry_name($zip_entry),
'filesize' =>
zip_entry_filesize($zip_entry)));
}
zip_close($sourcezip);
} else return false;
return $retval;
}
Expected result:
----------------
Warning: zip_read() expects parameter 1 to be resource, integer given
in C:\Inetpub\wwwroot\epo\include\function.php on line 439
Warning: zip_close() expects parameter 1 to be resource, integer given
in C:\Inetpub\wwwroot\epo\include\function.php on line 443
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39231&edit=1