Abort class-pclzip.php : Missing zlib extensions

Discussion in 'Installation/Configuration' started by zkvvoob, Mar 14, 2015.

  1. zkvvoob

    zkvvoob Member

    Hello,
    Yesterday the two websites running on Wordpress which I have had configured on my Ubuntu 14.04/ISPConfig 3.0.5.4 server started giving the error in the topic title. Now, I ran php-m and php-v and here's the output:
    Code:
    php -v
    PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:18:15)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
        with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
        with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
        with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
        with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
        with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo
    root@server:/home# php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dba
    dom
    ereg
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    hash
    iconv
    imagick
    intl
    json
    libxml
    mbstring
    mcrypt
    memcache
    memcached
    mhash
    ming
    mysql
    mysqli
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    recode
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    wddx
    XCache
    XCache Cacher
    XCache Coverager
    XCache Optimizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    XCache
    XCache Cacher
    XCache Coverager
    XCache Optimizer
    Zend OPcache
    which lead me to believe that zlib is indeed installed. Nevertheless, I ran apt-get install --reinstall zlibc zlib1g zlib1g-dev just for good measure.
    Despite all this, I still continue to get this error when opening a website. A refresh always gets me the actual website. But why is that? How do I solve it?
    Thank you!
     
  2. VANKO

    VANKO New Member

    whats your /var/log/apache2/error.log and /var/log/php5-fpm.log output?
     
  3. zkvvoob

    zkvvoob Member

    Here are the latest entries in the two log files you requested. Just before pulling them I tried opening one of the problematic websites and got the same error.
    Apache/error.log
    Code:
    [Sat Mar 14 21:10:01.744188 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/clients/
    [Sat Mar 14 21:10:01.744287 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/conf/
    [Sat Mar 14 21:10:01.744431 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/site1.com/
    [Sat Mar 14 21:10:01.744573 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/php-fcgi-scripts/
    [Sat Mar 14 21:10:01.744615 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/site2.org/
    [Sat Mar 14 21:10:01.745143 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/site3.eu/
    [Sat Mar 14 21:10:01.745183 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/site3.eu/
    [Sat Mar 14 21:10:01.745748 2015] [authz_core:error] [pid 20540] [client 127.0.0.1:57523] AH01630: client denied by server configuration: /var/www/site4.eu/
    php5-fhm.log
    Code:
    [11-Mar-2015 20:15:32] NOTICE: Finishing ...
    [11-Mar-2015 20:15:32] NOTICE: exiting, bye-bye!
    [11-Mar-2015 20:15:32] NOTICE: fpm is running, pid 25338
    [11-Mar-2015 20:15:32] NOTICE: ready to handle connections
    [11-Mar-2015 20:15:38] NOTICE: Finishing ...
    [11-Mar-2015 20:15:38] NOTICE: exiting, bye-bye!
    [13-Mar-2015 18:54:34] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
    
    [14-Mar-2015 16:50:39] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
    
    [14-Mar-2015 16:50:44] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
    
    [14-Mar-2015 19:38:00] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
     
  4. VANKO

    VANKO New Member

    It looks that access to the directory on the hard disk was denied by an Apache configuration.
    Take look on your vhost files (show your all <Directory></Directory> and <Location></Location> blocks).
    Somewhere must be wrong setting about "Order ...." or "Allow / Deny from ..."
    or just try to set on your vhost file "Allow from 127.0.0.0/255.0.0.0 ::1/128"
     
  5. zkvvoob

    zkvvoob Member

    But that makes no sense, a refresh always brings the website around. Besides, these errors above appear for most of the websites, even though I have no problems whatsoever with the ones NOT running Wordpress.
     
  6. VANKO

    VANKO New Member

    Whats your latest installed addons on your wordpress? Maybe wordpress .htaccess file is wrong.
    Try to access your admin panel in wordpress and try to set permalinks to default.
     
  7. zkvvoob

    zkvvoob Member

    I'm pretty confident the plugin causing the issue on both websites is iThemes Security. It has made some modifications to the .htaccess:
    Code:
    # BEGIN iThemes Security
        # BEGIN Hide Backend
                # Rules to hide the dashboard
                RewriteRule ^(/)?enter/?$ /wp-login.php [QSA,L]
         
        # END Hide Backend
        # BEGIN Tweaks
            <IfModule mod_rewrite.c>
                RewriteEngine On
          
                # Rules to prevent php execution in uploads
                RewriteRule ^(.*)/uploads/(.*).php(.?) - [F]
          
                # Rules to help reduce spam
                RewriteCond %{REQUEST_METHOD} POST
                RewriteCond %{REQUEST_URI} ^(.*)wp-comments-post\.php*
                RewriteCond %{HTTP_REFERER} !^(.*)site.com.*
                RewriteCond %{HTTP_REFERER} !^http://jetpack\.wordpress\.com/jetpack-comment/ [OR]
                RewriteCond %{HTTP_USER_AGENT} ^$
                RewriteRule ^(.*)$ - [F]
            </IfModule>
        # END Tweaks
    # END iThemes Security
    ## Default .htaccess file
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
     
  8. VANKO

    VANKO New Member

    Can you access wordpress admin panel ? If yes, go to the WP Dashboard --> Settings --> Permalinks, then click on default and save changes.
     
  9. zkvvoob

    zkvvoob Member

    Yes, I can access both Admin panels without any problems. Changed the permalink settings to default. Now what?

    P.S. I don't know if it became clear from my initial description, but the error message does NOT appear every time when I access the website, so I don't really see a pattern to troubleshoot. :(
     
  10. VANKO

    VANKO New Member

    problem solved?
     
  11. zkvvoob

    zkvvoob Member

    See my P.S. above.
    I don't know about solved. I can't really remain with the default permalinks, it would screw half my navigation, not to mention SEO.
     
  12. VANKO

    VANKO New Member

  13. zkvvoob

    zkvvoob Member

    Well, I found a topic of my own
    https://wordpress.org/support/topic/how-to-reset-ithemes-security-plugin-to-fix-issues
    did a full reset as described there, then re-enabled iThemes security and... got the same error about zlib missing. :(
    P.S. I also did what was described in the topics you gave me - changing the permalinks structure. Then I played quite heavily loading different pages and it all seemed fine... until the error appear out of the blue again.
     
    Last edited: Mar 14, 2015
  14. VANKO

    VANKO New Member

    make backup of your wordpress htaccess file, then be sure that it looks like this (delete everything else)
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
     
  15. zkvvoob

    zkvvoob Member

    Just did that as well, pristine new .htaccess, some playing around... and again : Abort class-pclzip.php : Missing zlib extensions
     
  16. VANKO

    VANKO New Member

    Hmm, try to edit class-pclzip.php
    Find "gzopen" and replace it with "gzopen64" (this occurs three times)

    other way:
    try to reinstall zlibc
    Code:
    sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
    service apache2 restart
     
  17. zkvvoob

    zkvvoob Member

    Hm, weird, I've done what you suggested - replacing 'gzopen' with 'gzopen64' and I've been opening pages after pages for 10 mins and no error has appeared. Could this be it really?
    Well, let's hope so. At any rate, if the error appears again, I'll write back in the topic.
    Thank you, VANKO, for your help and patience!
     
  18. VANKO

    VANKO New Member

    I am glad to hear that your problem has been (probably) solved. ;)
     
    Last edited: Mar 4, 2016

Share This Page