Preface
The gzuncompress function is not a system function that comes with PHP but a plug-in function. So 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.
1. Solution process
The function needs zlib support to be used normally
2. You can use a probe to check whether the function has been enabled in the current PHP version.
3. Solution: additional compile php and install zlib components
2. Solution steps
1. The development environment is centos6.5 bit php5.3
2. Reference code (cannot be used directly, please think about executing the following code)
[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/ /usr/local/php/lib/php/extension/ [root@leafrainy zlib]#vi /usr/local/php/lib/
Add toextension=
Restart apache
Summarize
The above is the entire content of this article. I hope the content of this article will be of some help to your study or work. If you have any questions, you can leave a message to communicate.