Forums

[resolved] fatal error installing plugins "cannot redeclare class pclzip" (15 posts)

  1. mufincutter
    Member
    Posted 3 years ago #

    After just updating to 2.7 I have not been able to add any new plugins. Invariably, I will try to install a plugin (making sure it is compatible with 2.7) and I get this message:

    Installing Plugin: RandomQuotr 1.0

    Downloading plugin package from http://downloads.wordpress.org/plugin/randomquotr.zip

    Unpacking the plugin package

    Fatal error: Cannot redeclare class pclzip in /home/"example"/public_html/blog/wp-admin/includes/class-pclzip.php on line 171

    how can I resolve this issue?

  2. mrheault
    Member
    Posted 3 years ago #

    i'm getting the same error as well.

  3. jefito
    Member
    Posted 3 years ago #

    Same here.

  4. mufincutter
    Member
    Posted 3 years ago #

    still no luck - still having issues - can anyone help?

  5. chaseathompson
    Member
    Posted 3 years ago #

    Good news! The fix here is relatively simple. Go into the admin panel, click on plugins, and disable the WordPress Automatic Upgrade plugin. It appears to be causing the problem in most, if not all, cases. Afterwards, you should be able to install other plugins as normal.

    cheers,

    Chase Thompson

    Pinson Church Blog
    Tech Talk with Chase and Sam

  6. badkermit
    Member
    Posted 3 years ago #

    Thanks, Chase. That worked for me.

  7. FatherStorm
    Member
    Posted 3 years ago #

    change file /wp-admin/includes/file.php, line 484 (2.7.1) as follows

    from

    require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');

    to

    if(! class_exists('PclZip')) {	require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');}
  8. mufincutter
    Member
    Posted 3 years ago #

    Now I'm having trouble upgrading to 2.7.1 with WP automatic upgrade plugin being the ONLY plugin activated. I get this error:

    Downloading update from http://wordpress.org/wordpress-2.7.1.zip

    Unpacking the core update

    Fatal error: Cannot redeclare class pclzip in /home/.../wp-admin/includes/class-pclzip.php on line 171

    Can anyone help?

  9. mikey1
    Member
    Posted 3 years ago #

    Hi, delete the Automatic Upgrade plugin.
    its not needed with 2.7 and causes conflict with the inbuilt system.
    mike.

  10. mufincutter
    Member
    Posted 3 years ago #

    great! that fixed it. thanks mikey!

  11. Visus
    Member
    Posted 3 years ago #

    I don't have WPAU plugin installed but I still get the line 171 fatal error when updating plugins.

    My WP is up to date but my plugins aren't. I have already did the line 484 edit. That only helps the automatic WordPress upgrade to 2.7.1 but does not help updating plugins

    Is my Built-in WPAU causing conflict is plugin upgrades somehow?

  12. net500cg
    Member
    Posted 3 years ago #

    It would be much appreciated if someone at WP would address this problem. The 'fixes' offered do NOT address the problem of automated ZIP errors. When the WP is current and there is no WPAU plugin to contend with - there is something else that is wrong.

    Please help.

  13. wuyihealthtea
    Member
    Posted 3 years ago #

    Like net500cg I agree that something else is wrong and I'd be grateful for some assistance with fixing this problem.

    The fix about disabling the Auto update plugin can't work for me as I've never installed the Auto Update plugin. The problem occurred from day 1 of the WordPress install. I guess that would have been ver 2.5.

    The only workaround I can think of would be to download all the plugins again and manually replace the current ones in my hosting account.

    Anyone have a better fix?
    Judi

  14. ottobonn28
    Member
    Posted 2 years ago #

    Further, there seems to be a problem on 2.8.3 with WordPress loading a plugin's main file too many times. I continuously get the "Fatal Error: Cannot redeclare function blahblah..." message, when I am absolutely sure that it has only been declared once. As a plugin developer, this is driving me nuts!

  15. Jeff Farthing
    Member
    Posted 2 years ago #

    I second that @ ottobohn. Do you know if the servers in question are running PHP as an Apache module or a CGI??

Topic Closed

This topic has been closed to new replies.

About this Topic