2

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
  • I'm having a similar issue after changing a site from HTTP to HTTPS. It seems to originate from plugin WP Better Security. I'll post a solution when I find one, if someone doesn't beat me to it.
    – KeithL
    Mar 24, 2015 at 14:16
  • This issue only started happening recently for me. What do you think caused this? Apr 21, 2015 at 2:19

2 Answers 2

0

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.

0

Actually, I changed

if (!function_exists('gzopen'))

to

if (!function_exists('gzopen64'))

to solve the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .