• Hi. I’ve been trying very hard so far to get some plugins working.

    My problem is that every plugin which has its own page in “Manage” gives me that output.

    I’ve already tried WP1.5.2 and today upgraded to WP2RC.

    For example the output on the “Backup” page:

    “Fatal error: Cannot redeclare class wpdbbackup in /blablabla/wp-content/plugins/wp-db-backup.php on line 26.”

    I really searched a lot of sites, but noone seems to deal with this specific problem.
    Even if I deactivate all plugins except the one I want to test, I get this error message. Besides that, the plugins seem to do their job (I tried my own ones as well). On the page itsself the ouput is correct, only the settings-pages won’t display.

    Is this some sort of server-specific problem? Is there a workaround?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hmmm… old plugins in new wordpress might exhibit this. It’s the case of the plugin being pulled in ‘normally’ in the loading of the admin area, PLUS pulled in AGAIN in loading the custom admin page. Some of my plugins have exhibited this issue (that’s how I know about it).

    -d

    Thread Starter AleXP

    (@alexp)

    Well, the ouptput I posted above is from the backup-plugin shipped with WP2-RC3. I guess this one at least has to be working with wp.

    The plugins itself do their job, but settings pages don’t. I’m forced to use “PHP 4.3.10”, maybe that could be a reason?

    I don’t know much about php, but I would really like to find a solution.

    Hi, were you able to resolve this? I’m having the same issue.

    Thanks!

    I was able to solve this for my plugin by adding a class_exists(“theclass”) before declaring the class. It checks if the class exists or not.

    I enclosed the class declaration within an if statement b/c some servers apparently halt execution of all php code when using a return statement, even though they shouldn’t for php includes.

    ie,

    if (!class_exists(“my_class”)) {
    class my_class {
    // yada…
    }
    }

    It wasn’t showing up for everyone though, so I don’t know if it is strictly a problem with WordPress.

    This problem turned up when I tried running WordPress 2.0.2 with PHP 4.4.2 on Linux. However I also tried PHP 5.1.1 on Windows XP and everything worked perfectly (same version of WordPress).

    Maybe it’s an issue/bug that PHP 4.4.2 is having with nested includes/requires. Or else it might be that PHP4 is having problems working on Linux.

    I tried, but couldn’t figure out how to fix it.

    rajkp

    awesome idea with that code.
    fixed my prob. even tho my proj. is not wp related.
    thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Cannot redeclare (all plugins affected)’ is closed to new replies.