Fatal error: Uncaught Error: Call to undefined function gzinflate()
Posted freess
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Fatal error: Uncaught Error: Call to undefined function gzinflate()相关的知识,希望对你有一定的参考价值。
原因:源码编译php时没有带上zlib
解决:编译PHP的zlib扩展
[[email protected] ~]# cd /usr/local/src/php-7.2.4/ext/zlib/ //进入PHP的zlib扩展目录 [[email protected] zlib]# cp config0.m4 config.m4 [[email protected] zlib]# /usr/local/php7/bin/phpize [[email protected] zlib]# /usr/local/php7/bin/phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [[email protected] zlib]# ./configure --with-php-config=/usr/local/php7/bin/php-config --with-zlib
[[email protected] zlib]# make && make install
编译安装完成后可以发现编译目录中存在zlib.so文件:
[[email protected] zlib]# ls /usr/local/php7/lib/php/extensions/no-debug-non-zts-20170718/ mysqli.so opcache.a opcache.so zlib.so
编辑php.ini文件:
[[email protected] zlib]# vi /usr/local/php7/lib/php.ini extension=zlib.so //添加zlib.so扩展 wq //保存退出
接下来重启php-fpm服务,查看PHP配置信息:
回到管理后台首页,页面返回成功:
以上是关于Fatal error: Uncaught Error: Call to undefined function gzinflate()的主要内容,如果未能解决你的问题,请参考以下文章
运行PHP-Parser报错:PHP Fatal error: Uncaught Error: Class ‘PhpParserParserFactory‘ not found
DVWA--登录页面错误问题 469 | | PHP Fatal error: Uncaught exception 'PDOException' with message '
PHP Fatal error: Uncaught ErrorException: preg_match_all (): JIT compilation failed: no more memory
PHP Fatal error: Uncaught ImagickException: unable to open file `/tmp/magick-4IYcJieVjh20NioJ6Zu8aG
PHP Fatal error: Uncaught ImagickException: unable to open file `/tmp/magick-4IYcJieVjh20NioJ6Zu8aG
出现Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full err