PHP Fatal error: Call to undefined function gzinflate()

I have a php script and whenever I run it, I get the following error message in my log file:
     2017/02/05 23:25:46 [error] 9696#9696: *10 FastCGI sent in stderr: “PHP message: PHP Fatal error: Call to undefined function gzinflate() in /home/xxxx/http/includes/functions.php(1) : eval()’d code on line 1″ while reading response header from upstream, client: 10.218.105.1, server: newsletter.cyberciti.biz, request: “GET /a/ HTTP/1.0”, upstream: “fastcgi://127.0.0.1:9000”, host: “server1.cyberciti.biz”
How do I fix this problem on Alpine Linux or Unix operating systems?

You need to use Zlib. The Zlib support in PHP is not enabled by default. You will need to configure PHP –with-zlib[=DIR]. The Windows version of PHP has built-in support for this extension. You do not need to load any additional extensions in order to use these functions. However, on Linux or Unix you need to install php5-zlib or php7-zlib as per your distro.

ADVERTISEMENTS

Install php5-zlib or php7-zlib on Alpine Linux

# apk add php5-zlib
OR
# apk add php7-zlib
You must restart php-fpm or apache/lighttpd process:
# rc-service php-fpm restart
OR
# /etc/init.d/php-fpm restart

Install php56-zlib on FreeBSD

Type the following command:
# pkg install php56-zlib
OR
# pkg install php70-zlib
Make sure you restart the php-fpm:
# service php-fpm restart

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
2 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.