PHP Fatal error: Call to undefined function zip_entry_close() in /aboutus.php:13
ERROR : PHP Fatal error: Call to undefined function zip_entry_close()
I got the PHP error ‘PHP Fatal error: Call to undefined function zip_entry_close() in /aboutus.php:13’ when I accessed the site in the browser and the server error logs shows the same. You will get the above error if php-zip extension is not enabled on your server. Do the below steps to install php-zip module on your linux server.
1. Log into your Linux server as ‘root’ user
1. Log into your Linux server as ‘root’ user
2. Run the command ‘php -m | grep zip’ to check whether PHP zip module is installed
The above command will return ‘zip’ output if zip extension is installed.
3. Run the command ‘yum whatprovides php-zip’ to check which package provides zip module
—–
# yum whatprovides php-zip
php-common-5.4.16-46.el7.x86_64 : Common files for PHP
Repo : base
Matched from:
Provides : php-zip
php-zip extension is provided by php-common package.
——
4. You can install php-common package using yum command
command :
# yum install php-common
5. After installing php-common, you can check whether php-zip is enabled by either creating a phpinfo() page or by running the command ‘php -m | grep zip’