Fatal error: Call to undefined function zip_read() in /aboutus.php on line 3
Fatal error: Call to undefined function zip_read() in /aboutus.php on line 3
I got the error “Fatal error: Call to undefined function zip_read() in /aboutus.php on line 3” on my aboutus.php page and in the server error logs. zip_read() function reads the next entry in a zip file archive. PHP zip extension might not be installed on your linux server. Do the below steps to install PHP zip extension on centOS / Redhat 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 zip extension is installed or not.
Command : # php -m | grep zip
The above command will return ‘zip’, if zip extension is already enabled.
3. If the above command didn’t return any output then check whether php-common package is installed on the server. php zip extension is provided by php-common package.
command : #yum whatprovides php-zip
# yum whatprovides php-zip
php-common-5.4.16-46.el7.x86_64 : Common files for PHP
Repo : base
Matched from:
Provides : php-zip
4. You can install php-common package using yum command.
Command :
# yum install php-common
5. Create a phpinfo page to check whether php-zip extension is enabled.