Home  >  Article  >  Backend Development  >  php zlib extension installation path

php zlib extension installation path

藏色散人
藏色散人Original
2020-09-28 09:44:193395browse

php zlib extension installation method: first enter the extension source code directory; then generate the compilation configuration file; then download and install the zlib library; and finally regenerate the configuration.

php zlib extension installation path

Recommended: "PHP Video Tutorial"

php installation zlib extension

zlib: Implement GZIP compression page

Installation steps

1. Enter the extended source code directory

cd php-5.3.20/ext/zlib/

2. Generate the compilation configuration file and run

mv config0.4 config.4
/usr/local/php/bin/phpize

3. Configuration generation

./configure --with-php-config=/usr/local/php/bin/php-config

Found that it depends on the zlib library, download the library, install, download address: http://www.zlib.net/

tar zxf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure --prefix=/usr/local/services/zlib/
make
make install

4. Regenerate the configuration, compile and generate so

./configure --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir=/usr/local/services/zlib/
make

5, copy so to the extensions directory of php, and add the extension to php.ini

cp modules/zlib.so /usr/local/php/extension/
echo "extension=zlib.so" >> /usr/local/php/lib/php.ini

done, the installation is complete

The above is the detailed content of php zlib extension installation path. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn