PHP Fatal error: Class ‘ZipArchive’ not found
PHP fatal error on ‘zip Archive’ not found clearly shows that the
zip extension has to be installed for
zipArchive class to be present.
Moreover, the solution is to install the PHP zip extension on your server.
Install PHP Zip Extension
If your webserver is on Linux, then you can install PHP Zip extension using the below command:
sudo apt-get install php-zip
sudo yum install php-zip
If you are having multiple versions of PHP and want to link Zip extension with a specific version of PHP, then below is the command:
Based on the PHP version you have installed in the server, use the command line as version described 7.0, 7.1, 7.2, 7.3.
sudo apt-get install php7.0-zip or sudo yum install php7.0-zip
Once done, restart the webserver.
Restart Apache/Nginx Web Server:
sudo systemctl restart nginx or sudo systemctl restart apache2 or /etc/init.d/nginx restart or /etc/init.d/apache restart
If you are using PHP-FPM, then you need to restart this service also.
sudo systemctl restart php-fpm or sudo systemctl restart php-fpm or /etc/init.d/php-fpm restart or /etc/init.d/php-fpm restart
That’s it! everything will work fine by applying the above simple crack.
Thanks for using pheonix solutions.