PHP Classes

ZipArchive Error

Recommend this page to a friend!

      Fast Pages  >  All threads  >  ZipArchive Error  >  (Un) Subscribe thread alerts  
Subject:ZipArchive Error
Summary:Fatal error: Uncaught Error: Class "ZipArchive" not found
Messages:1
Author:Terry Woody
Date:2024-06-20 12:17:34
 

  1. ZipArchive Error   Reply   Report abuse  
Picture of Terry Woody Terry Woody - 2024-06-20 12:17:34
Sorry, I do not speak Portuguese so will proceed in English...

I am working on a new local server and see that I do not have ZipArchive installed.

Fatal error: Uncaught Error: Class "ZipArchive" not found in /home/wwwroot/qikserver.com/testbed/phpclasses-projects/fastpages/gerar_paginas.php:169 Stack trace: #0 {main} thrown in /home/wwwroot/qikserver.com/testbed/phpclasses-projects/fastpages/gerar_paginas.php on line 169

Line 169: $zip = new ZipArchive();

Might be better to handle error with something like:

try {
$zip = new ZipArchive();
// continue with your code
} catch (Error $e) {
echo 'To use this feature, you need to install ZipArchive on your PHP server!';
}

Thanks for sharing!