TransWikia.com

Abort class-pclzip.php : Missing zlib extensions

Ask Ubuntu Asked by zkvvoob on November 21, 2021

Since I recovered from some mess that I was having after upgrading my Ubuntu server to 14.04, the two WordPress websites that I have hosted on the server have been randomly displaying the following error message upon opening:

Abort class-pclzip.php : Missing zlib extensions

The strange thing is that a refresh gets rid of the message. While this works for me, it’s not a good idea to rely on guest visitor’s quick-wittedness.

So, could you help me figure out what’s missing and how to add it?

Thank you!

2 Answers

Actually, I changed

if (!function_exists('gzopen'))

to

if (!function_exists('gzopen64'))

to solve the issue.

Answered by Henry on November 21, 2021

To get around this issue, I had to recompile PHP from source code with support for zlib turned on. By default, PHP 5.5.x does not include zlib support.

After downloading source from the PHP site (from my home directory):

gunzip php-5.5.23.tar.gz
tar xvf php-5.5.23.tar
cd php-5.5.23
./configure --with-mysql --with-mysqli --enable-zip --enable-mbstring --with-zlib
make
sudo make install

This installs PHP into /usr/local

You'll also need to update your Apache server to look for the php.ini file in /usr/local/lib if it is set to look elsewhere.

The underlying cause is a Wordpress plug-in that is checking for ZLIB support, and mistakenly thinks your PHP installation supports it. Similar to yourself, I would see this error message randomly.

Answered by KeithL on November 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP