Support » Plugins » fatal error installing plugins “cannot redeclare class pclzip”

  • Resolved mufincutter

    (@mufincutter)


    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?

Viewing 14 replies - 1 through 14 (of 14 total)
  • i’m getting the same error as well.

    Same here.

    Thread Starter mufincutter

    (@mufincutter)

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

    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

    Thanks, Chase. That worked for me.

    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');}
    Thread Starter mufincutter

    (@mufincutter)

    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?

    mikey1

    (@mikey1)

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

    Thread Starter mufincutter

    (@mufincutter)

    great! that fixed it. thanks mikey!

    Visus

    (@visus)

    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?

    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.

    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

    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!

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘fatal error installing plugins “cannot redeclare class pclzip”’ is closed to new replies.