Mudit Dugar
Mudit Dugar

Reputation: 121

php 7.2 ZipArchive class not having setEncryptionName function

Have upgraded my php version from 5.6 to 7.2 but i dont see new php functions like setEncryptionName for ZipArchive class. i confirm this by echoing get_class_methods('zipArchive'). Do i need to do anything else in order to use the new set of functions the newer php version provides? Please help.

Upvotes: 1

Views: 1077

Answers (1)

dehart
dehart

Reputation: 1678

The ZipArchive class is part of the zip PECL extension for PHP

You will need version 1.14.0 is higher for the setEncryptionName() function

See changelog here: https://pecl.php.net/package/zip/1.14.0

The zip extension depends on libzip >= 1.2.0

NOTE: many Linux distributions ship an older version of libzip. You might be able to find a newer version here: https://libzip.org/packages/ Otherwise you will need to compile it yourself.

Upvotes: 2

Related Questions