[Solved] ZipArchive extension: disabled/not installed on Ubuntu
If you have come across the following error:
ZipArchive extension: <strong>disabled/not installed</strong>
This just means that you are missing the php-zip module. I ran into this when deploying a Laravel app that needed to generate ZIP downloads — the extension isn’t included in the default PHP installation on Ubuntu.
How to fix the ZipArchive extension problem
Run the following command:
sudo apt-get install -y php-zip
Now restart Apache2, and you’re good!
service apache2 restart
If you’re running PHP-FPM instead of mod_php, restart the FPM service instead (sudo systemctl restart php8.1-fpm or whatever version you’re on). You can verify the extension is loaded by running php -m | grep zip on the command line.