This error usually occurs because your PHP version is not supported.ZipArchive::setOptions()This method is introduced in PHP 5.6.0 and later versions; if your PHP version is below 5.6.0, you cannot use this method.
To resolve this issue, you can consider one of the following two methods:
Upgrade your PHP version: If your PHP version is below 5.6.0, you can try upgrading to PHP 5.6.0 or a later version to proceed.
ZipArchive::setOptions()method.Use alternative methods to configure ZipArchive options: If you are unable to upgrade your PHP version, you can use other approaches to set ZipArchive options—for example, by doing so after creating the ZipArchive object.
ZipArchive::setArchiveComment()Set method options. You can insert the following code snippet:$zip->setOptions(array('default_charset' => 'UTF-8'));replace with:
$zip->setArchiveComment('default_charset=UTF-8');Hope this helps!
This allows you to configure the ZipArchive options and resolve the issue.