php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Zip::extractTo return false on actual zip file

Open foremtehan opened this issue 4 years ago • 1 comments

Description

The following code:

<?php
$zip = new \ZipArchive();
$zip->open('subtitle.zip');

$zip->extractTo('.'); // false

The following file is real zip archive because the open method return true, But the extractTo for some reason return false.

subtitle.zip

Is is possible to find the cause ?

PHP Version

PHP 8.0.0

Operating System

Windows 10

foremtehan avatar Dec 22 '21 10:12 foremtehan

Checking $zip->status partially reveals what's going on. It is ZipArchive::ER_COMPNOTSUPP, because the archive entries are compressed with PPMd, and that compression method is not supported by libzip. Consider to file a respective feature request upstream.

cmb69 avatar Dec 22 '21 11:12 cmb69