Explanation of the solutions that gzuncompress functions cannot use in PHP

Source: Internet
Author: User
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 )!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.