WordPress.org

Ready to get started?Download WordPress

Forums

Akismet
Unexpected Output During Akismet Activation (16 posts)

  1. agreda
    Member
    Posted 3 years ago #

    After upgrading to Akismet 2.4.0 running on WP 3.0.1 (Multisite) bloggers get the following message upon activation:

    The plugin generated 618 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    FYI: We have hardcoded our key in the plugin where indicated as usual, and have never seen this message before.

    Thanks in advance for any feedback!

  2. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Odd, I haven't been able to reproduce this so far on WP 3.0.1 with multi-site enabled. Any other errors in the logs that might point out what happened?

  3. agreda
    Member
    Posted 3 years ago #

    Thanks for the quick reply. Hopefully this was a case of operator error. See this from our server error log report..

    [error] PHP Warning: include_once() [function.include]: Failed opening '/home/tripawds/public_html/wp-content/plugins/legacy.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tripawds/public_html/wp-content/plugins/akismet.php on line 45, referer: http://SUBSITE_URL_CHANGED.tripawds.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1

    After deleting akismet.php from the plugins folder and uploading the entire Akismet folder (including the plugin and legacy.php), the error is no longer occurring.

    Perhaps a review of the installation instructions is in order!

    Readme.txt says:

    Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.com API key](http://akismet.com/get/).

    Might want to clarify that the whole folder or at least legacy.php needs to be in place.

    Thanks again, please advise if I'm mistaken about the server error.

  4. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    If you are using WP 3.0.1 you shouldn't need legacy.php though.

  5. agreda
    Member
    Posted 3 years ago #

    That's what I thought. But without it I was clearly generating the above errors. :-\ Just confirmed, no errors upon activation now.

    Thanks again for your input.

  6. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    Ok, I'll look closer at that. If there is a bug in the logic for determining if legacy.php is needed we'll get it fixed for the next release.

  7. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    I still haven't been able to reproduce this. The legacy.php file should only be included if we detect an old $wp_db_version, any chance you've been skipping database upgrades?

  8. agreda
    Member
    Posted 3 years ago #

    ...any chance you've been skipping database upgrades?

    Haven't missed a beat, that I know of. Where would I look to confirm our $wp_db_version? PHP MyAdmin reports the following for wp_1_options...
    option_id: 57
    blog_id: 0
    option_name: db_version
    option_value: 15477
    autoload: yes

    All has been working well since uploading the Akismet folder including legacy.php. Thanks for your attention to this. Happy to help troubleshoot anyway i can.

  9. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    15477 sounds right.

    Here's the code I was talking about:

    if ( $wp_db_version <= 9872 )
        include_once( dirname(__FILE__) . '/legacy.php' );

    Can you try doing this again on a fresh WP3 install? If there is a general problem with this I definitely like to get it resolved.

  10. agreda
    Member
    Posted 3 years ago #

    Sorry for the delay. I have not yet had the chance to test this on a clean install, and doubt i'll be able to do that anytime soon. I did, however, try on another test multi-site we have, with the following results...

    Uploaded akismet.php only (with no key hardcoded) and activated it successfully on main blog. Attempt to activate on sub-site with no other plugins activated resulted in the same error as above...

    The plugin generated 618 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Deactivated plugin from subsite, hardcoded the key, then reactivated it and got the same error again.

    Server logs during this time indicate the following:

    [error] PHP Warning: include_once() [function.include]: Failed opening '/home/maindir/public_html/wp-content/plugins/legacy.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/maindir/public_html/wp-content/plugins/akismet.php on line 45, referer: http://url.hasbeen.changed/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1

    Deactivated plugin from substite and main blog, uploaded Akismet folder including legacy.php and then successfully activated plugin on main blog and subsite without any errors.

    Both sites are running WP 3.0.1 MultiSite, with Aksimet 2.4.0. Hope this helps.

  11. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    I wonder if WP isn't reporting the DB version for that particular case.

  12. agreda
    Member
    Posted 3 years ago #

    On two separate installs? Granted, they are "practically" mirrors, but not exactly identical. If there is a way I can tell about the reporting, just let me know.

  13. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    What I meant was, perhaps WP is only reporting the DB version on multi-site installs for the main/primary blog. That would cause the DB version check to fail for sub-sites.

  14. WraithKenny
    Member
    Posted 3 years ago #

    I get 160 chars of unexpected output because I have WP_DEBUG turned on, (the notices are the output).

  15. WraithKenny
    Member
    Posted 3 years ago #

    "PHP Notice: Undefined variable: wp_version in /wp-content/plugins/akismet/akismet.php on line 508"

  16. Marta
    Member
    Posted 2 years ago #

    Also I had the same problem.....I had WP_DEBUG turned ON

    I deleted akismet folder and install again with debug false and all is ok!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic