ID:               39231
 Updated by:       [EMAIL PROTECTED]
 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] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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

Reply via email to