The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Akismet Problem (19 posts)

  1. TheGeneral
    Posted 10 years ago #

    Hey all,

    I was having problems with Spam Karma II after installing the Beta 1 release, so I uninstalled SK II. After upgrading to Beta 2, I installed Akismet, and supplied it with my WordPress Key. Everything was fine.

    But when I went to the "Manage" tab and clicked on the sub-menu "Akismet Spam (0)", I got the following message:

    "Fatal error: Cannot redeclare ksd_config_page() (previously declared in C:\Inetpub\wwwroot\mt\benjoblog\wp-content\plugins\akismet\akismet.php:14) in C:\Inetpub\wwwroot\mt\benjoblog\wp-content\plugins\akismet\akismet.php on line 13"

    Does anyone have any clues as to what is going on? I pored over the code, and couldn't figure out why I was receiving this error.

    Thanks in advance!

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Why not uninstall that version, and go get the new upgraded one ?


  3. TheGeneral
    Posted 10 years ago #

    First, thank you for the quick response.

    I upgraded to version 1.11 (deleting the old, uploading the new), but I'm still getting the same error.

    Anything else I can do?

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I would deactivate the plugin, then delete the plugin, then check through your blog that all is good.
    Then upload and activate again.

    I cannot see either why it is doing this ..

  5. TheGeneral
    Posted 10 years ago #


    I followed the steps you outlined, but am still encountering the same problem.

    Could this have anything to do with the version of PHP that my host is using, or perhaps with the fact that the blog is hosted on a Win-box?

  6. Kafkaesqui

    Posted 10 years ago #

    It's a Windows-based problem. I see the same issue on my XP test system, but not on my host.

  7. TheGeneral
    Posted 10 years ago #

    Kafkaesqui (and everyone else),

    Any idea what in particular is causing this problem? Why does a windows host cause this bizarre result?

  8. Kafkaesqui

    Posted 10 years ago #

    If I knew the specifics then writing plugins with admin pages would come a lot easier to me... But generally, it appears to be an underlying effect in how plugins are loaded by WordPress and differences in PHP on the server in use. In any case, here's a possible solution.

    Edit the Akismet file (akismet/akismet.php) through the Plugin Editor, or offline with any text editor. Just after this line at the top of the script:

    add_action('admin_menu', 'ksd_config_page');

    Add the following:

    if(is_plugin_page()) :
    else :

    Then add a closing endif at the end of the script:

    add_action('activity_box_end', 'akismet_stats');


    I've just tested this on both my setups and it seems to run fine, but I'd like to see if others hit any problems before submitting a "fix" to Matt.

  9. TheGeneral
    Posted 10 years ago #

    (Bows before Kafkaesqui)...

    Awesome! I am now able to access the Akismet manage page without any problems! Now to see just how well this beast handles Spam... :)

    Thanks Kafkaesqui!

  10. aquazero
    Posted 10 years ago #

    Thank you...

  11. Matt Mullenweg
    Posted 10 years ago #

    Try the latest version 1.12 of the plugin.

  12. TheGeneral
    Posted 10 years ago #

    Uggh. Sorry Matt, I'm getting the same error with version 1.12 that I did with 1.1 and 1.11 :(

    In fact, now I'm getting it on both plugin pages [Plugins->Akismet Configuration and Manage->Akismet Spam (0)] whereas before only on the Manage page.

  13. TheGeneral
    Posted 10 years ago #

    Just thought I'd let everyone know that I applied the "patch" Kafkaesqui mentioned above to Akismet 1.12 and everything works fine now.

  14. Alex Mills (Viper007Bond)
    Posted 10 years ago #

    For the record, SKII works perfectly fine here in both beta-2 and RC-1.

  15. tsimmons
    Posted 10 years ago #

    I'm still getting the same error with 1.12. In addition, when I try the fix above (wrapping in the if/else) I get a new error when I click on "Akismet Configuration" in plugins admin: Call to undefined function: ksd_caught().

    I am running on IIS/Win2K.

  16. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    I've seen this caused by having the plugin installed twice. Once in plugins/ and once in plugins/akismet/?

  17. Kafkaesqui

    Posted 10 years ago #

    Ryan, are you claiming I'd make such a mistake? :)

  18. companje
    Posted 10 years ago #

    I've got the same problem as tsimmons has above. I am using (trying to) version 1.14 on IIS

  19. itti
    Posted 10 years ago #

    I have the same problem. Linux Gentoo Machine/Apache2.055/PHP5.0.5

Topic Closed

This topic has been closed to new replies.

About this Topic