#39537 [Fbk->Opn]: extractTo(dest,file) method doesn't work

From: Date: Sat, 18 Nov 2006 11:33:16 +0000
Subject: #39537 [Fbk->Opn]: extractTo(dest,file) method doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-105176@lists.php.net to get a copy of this message
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 Assigned To: pajoye New Comment: I didn't know that the params of $zip->extractTo() are case sensitive, which is unusual for windows. Nevertheless I have some cases, where the application hangs and I have to reboot the machine. Give me some days to check this out. Previous Comments: ------------------------------------------------------------------------ [2006-11-17 18:46:34] pajoye@php.net I cannot reproduce it on windows and unix, using CLI, apache2 , IIS or CGI. What's the status after the extractTo call? Can you paste it here? do a var_dump($zip); after having called it. ------------------------------------------------------------------------ [2006-11-16 21:27:43] hscheidegger at zumbach dot ch 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. ------------------------------------------------------------------------ [2006-11-16 18:33:41] tony2001@php.net 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] tony2001@php.net 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. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39537 -- Edit this bug report at http://bugs.php.net/?id=39537&edit=1

« previous php.bugs (#105176) next »