This article mainly introduces the solutions that gzuncompress functions cannot use in PHP. the introduction in this article is very detailed. if you need it, you can refer to it for reference. let's take a look at it. This article mainly introduces the solutions that gzuncompress functions cannot use in PHP. the introduction in this article is very detailed. if you need it, you can refer to it for reference. let's take a look at it.
Preface
The gzuncompress function is not a built-in php system function but a plug-in function. therefore, to use the gzuncompress function, we must install a plug-in. let's take a look at the solution to the problem that the PHP function gzuncompress cannot be used.
I. Solution process
1.gz uncompress function can be used normally only after zlib is supported
2. you can use a probe to check whether the function is enabled in the current php version.
3. Solution: compile php and install the zlib component.
2. Solution steps
1. the development environment is centos6.5 bit php5.3
2. refer to the code (you cannot use it directly. please think about the code below)
[root@leafrainy zlib]# pwd /root/dl/php/ext/zlib[root@leafrainy zlib]#mv config0.m4 config.m4 [root@leafrainy zlib]#/usr/local/php/bin/phpize [root@leafrainy zlib]#./configure --with-php-config=/usr/local/php/bin/php-config [root@leafrainy zlib]#make [root@leafrainy zlib]# cp modules/zlib.so /usr/local/php/lib/php/extension/ [root@leafrainy zlib]#vi /usr/local/php/lib/php.ini
Addextension=zlib.so
Restart apache
Summary
The above is a detailed explanation of the solution that gzuncompress functions cannot use in PHP. For more information, see PHP Chinese website (www.php1.cn )!