1 (edited by moals 2018-06-11 17:55:26)

Topic: ZipArchive - setEncryptionName() missing

I am not sure if I am in the correct location, however since it appears that you (Remi) have done much work on this, I thought to start here.  I appreciate any help you're able to provide.

I have inherited a task that requires encrypted/password protected zip files.  The server is RHEL 7, cPanel (EasyApache 7.2).
PHP Version 7.2.6

From PHPInfo - ZIP
Zip    enabled
Zip version    1.15.2
Libzip version    1.1.2

I believe that I have the latest PECL Zip installed, However continue to have setEncryptionName() missing from ZipArchive.  A little digging and seems that I also need LibZip >= 1.2, however unable to resolve how to upgrade(?) Libzip to >= 1.2.

Can you assist?

Re: ZipArchive - setEncryptionName() missing

> The server is RHEL 7, cPanel (EasyApache 7.2).

Sorry but this forum is for user of my repository.

> Libzip version    1.1.2

You need libzip > 1.2

$ php --ri zip

zip

Zip => enabled
Zip version => 1.15.2
Libzip headers version => 1.3.2
Libzip library version => 1.5.1

$ php --re zip | grep Encryp
        Method [ <internal:zip> public method setEncryptionName ] {
        Method [ <internal:zip> public method setEncryptionIndex ] {
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ZipArchive - setEncryptionName() missing

Thank you for your response...

I stepped through the commands in the wizard for install of php72, multiple versions. 
However received message "No package php72 available."

I listed the available items in remi-safe and didn't see php72, however did see libzip5, so I installed it
  yum --enablerepo=remi-safe install libzip5
however php --ri zip still shows libzip 1.1.2

Are you able to assist?

Re: ZipArchive - setEncryptionName() missing

> However received message "No package php72 available."

Because you are not using CentOS but a cpanel heavily altered distribution

Check the exclude directives added by cpanel in yum configuration.

> yum --enablerepo=remi-safe install libzip5

Won't help. The library need to be used at build time, at run time is not enough.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi