PHP Fatal error: Class ‘ZipArchive’ not found

PHP Fatal error: Class ‘ZipArchive’ not found

Date: 19/09/2019

Introduction

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:

Ubuntu/Debian:

sudo apt-get install php-zip

Redhat/CentOS:

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

Restart PHP-FPM:

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.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Comment

Scroll to Top