Symptom:
When attempting to run a script that utilizes the ZipArchive class after installing Archive_Zip 0.1.1 on a Linux server, users may encounter the following fatal error:
Fatal error: Class ZipArchive not found in ...
Cause:
This error occurs because the ZipArchive class requires the PHP zip extension to be present.
Resolution:
To resolve this issue, follow these steps:
1. Install the PHP Zip Extension:
Debian/Ubuntu:
sudo apt update sudo apt install php-zip
2. Restart the Web Server:
Apache:
sudo systemctl restart apache2
Nginx:
sudo systemctl restart nginx
Additional Notes:
The above is the detailed content of Why Am I Getting a \'Class \'ZipArchive\' Not Found\' Error After Installing Archive_Zip on My Linux Server?. For more information, please follow other related articles on the PHP Chinese website!