Home > Article > Backend Development > php zlib extension installation path
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.
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!