ID:               39537
 User updated by:  hscheidegger at zumbach dot ch
 Reported By:      hscheidegger at zumbach dot ch
-Status:           Feedback
+Status:           Open
 Bug Type:         Zip Related
 Operating System: Windows XP
 PHP Version:      5.2.0
 New Comment:

When I do:
$zip->extractTo('/my/destination/dir/');
every file in the archive is extracted.

When I do:
$zip->extractTo('/my/destination/dir/', 'pear_item.gif');
no file is extracted and no error message appear.

When I do:
$zip->extractTo('/my/destination/dir/',
array('pear_item.gif','testfromfile.php'));
no file is extracted and no error message appear.


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

[2006-11-16 18:33:41] [EMAIL PROTECTED]

What is the actual result you get?

------------------------------------------------------------------------

[2006-11-16 18:23:02] hscheidegger at zumbach dot ch

use the script from the php documentation found here:
http://ch2.php.net/manual/en/function.ziparchive-extractto.php

<?php
$zip = new ZipArchive;
$res = $zip->open('test_im.zip');
if ($res === TRUE) {
   $zip->extractTo('/my/destination/dir/', array('pear_item.gif',
'testfromfile.php'));
   $zip->close();
   echo 'ok';
} else {
   echo 'failed';
}
?>

------------------------------------------------------------------------

[2006-11-16 18:04:31] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2006-11-16 17:55:52] hscheidegger at zumbach dot ch

Description:
------------
extractTo() method only works when extracting every file from the Zip
archive.
Single and multiple file extraction does not work.

Win XP
Apache 2.2.3
PHP latest snap, ApacheModul

CLI doesn't work neither.

Regards, H-P Scheidegger



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39537&edit=1

Reply via email to