Fatal error: Call to undefined function zip_close() in /aboutus.php on line 7

Fatal error: Call to undefined function zip_close() in /aboutus.php on line 7

 

My website and server error logs shows error ‘Fatal error: Call to undefined function zip_close() in /aboutus.php on line 7’. PHP zip extension might not be installed on your server.
 
Do the below steps to install PHP zip extension on centOS / Redhat server.

1. Log into your Linux server as root user

2. Run the command ‘php -m | grep zip’ to check whether PHP zip extension is enabled or not

The above command will return output if PHP zip extension is enabled.

3. Check whether PHP common package is installed, if the above command didn’t return any output.

Command to check whether php-common package is installed :

# rpm -qa | grep php-common

OR

# yum list installed | grep php-common

PHP zip extension is provided by this package.

4. Install php-common package using yum command.

Command to install php-common:

# yum install php-common

5. After installing php-common, run the command ‘php -m | grep zip’ to make sure the extension is enabled.