Activate module "zlib" in php 5.5

2

I have a Magento store hosted on a dedicated server and to generate a PDF file in one of the platform modules you need to have the Zlib extension installed. The same is already installed, if I execute the following command in the terminal the extension appears in the listing:

  

php -m

However, if you execute the following command, it shows that such a 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 configure PHP with --with-zlib [= DIR]", however I have no idea where to run this code "--with-zlib [= DIR]"

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

    
asked by anonymous 09.06.2015 / 22:56

2 answers

2
  

If compiled in Ubuntu 16.04 64Bits, follow the script I made for the Site Hosting course with ISPConfig :    link

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
    
08.06.2017 / 05:15
1

Assuming you had 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)

    
09.02.2017 / 13:03