Home > Backend Development > PHP Problem > php zlib extension installation path

php zlib extension installation path

藏色散人
Release: 2023-03-06 06:50:02
Original
3552 people have browsed it

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/
Copy after login

2. Generate the compilation configuration file and run

mv config0.4 config.4
/usr/local/php/bin/phpize
Copy after login

3. Configuration generation

./configure --with-php-config=/usr/local/php/bin/php-config
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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!

Related labels:
php
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template