Enable "zlib" module in php 5.5

Asked

Viewed 514 times

2

I have a Magento store hosted on a dedicated server and to generate a PDF file in one of the platform modules it is necessary to have installed the Zlib extension. It is already installed, if I execute the following command in the terminal the extension appears in the list:

php -m

But if you execute the following command, it shows that the module is disabled:

php -i

Among the information presented, we have this:

Directive => Local Value => Master Value zlib.output_compression => Off => Off

zlib.output_compression_level => -1 => -1

zlib.output_handler => no value => no value

I added "zlib.output_compression = On" in php.ini but nothing has changed.

In the PHP manual it says "You need to set up PHP with --with-zlib[=DIR]", but I have no idea where to run this code "-with-zlib[=DIR]"

If anyone can help me I will be very grateful, because I am looking for a solution to this for days.

  • Tried restarting the server? oo

  • Managed to solve your problem?

2 answers

2


If compiled on Ubuntu 16.04 64bits, follows the script I made for the Site Hosting course with Ispconfig: https://gist.github.com/jniltinho/959f873a84b72ddd9fca2513a52a6b04

Install these packages:

apt-get -y install build-essential libxml2-dev libxslt1-dev 
apt-get -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev
apt-get -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev
apt-get -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev 
apt-get -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-devlibxml2-dev libbz2-dev 
apt-get install libcurl4-openssl-dev libjpeg-dev libicu-dev libxml2-dev
apt-get install libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-dev
  • Welcome Nilton OS. To make the answer more complete, in addition to the link, put your script in the answer. When possible, also do the [tour] of the site and get to know the community better. :)

1

Assuming you have this problem by using PHP 7.0, then you should install the following package:

sudo apt-get install php7.0-zip

Another tip is that if you want to know all the libraries available for PHP, use the command:

sudo apt-cache search php7.0-*

This should solve your problem, (I assume you are using Debian or Ubuntu)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.