ID:               39231
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lajbr at seznam dot cz
-Status:           Open
+Status:           Feedback
-Bug Type:         Reproducible crash
+Bug Type:         Unknown/Other Function
 Operating System: Windows 2003 Server
 PHP Version:      5.1.6
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[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