|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-09-22 12:34 UTC] julientld at free dot fr
[2017-11-28 08:44 UTC] ab@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: ab
[2017-11-28 08:44 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 10:00:01 2025 UTC |
Description: ------------ I try to read directly the content of a ZIP archive entry with ZipArchive::getStream to put its content into a variable with fread(). The archive is protected by a password (ZipCrypto standard method). But getStream() doesn't take into account setPassword(). I do not have problem to read the entry with getStream() from a non-password protected archive. I do not have problem to extract the entry with extractTo() from a password protected archive. Thanks. Host configuration : Windows 7, IIS, PHP 7.0.3 NTS x64, FastCGI Test script: --------------- <?php $zip = new ZipArchive; $zip->open("test.zip"); $zip->setPassword("password"); $fileID = $zip->getStream("test.txt"); if(is_resource($fileID)) { echo("OK"); } else { echo("NOT OK"); } fclose($fileID); $zip->close(); ?> Expected result: ---------------- OK Actual result: -------------- NOT OK