• 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!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Joseph Scott

    (@josephscott)

    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?

    Thread Starter agreda

    (@agreda)

    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: https://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](https://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.

    Plugin Contributor Joseph Scott

    (@josephscott)

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

    Thread Starter agreda

    (@agreda)

    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.

    Plugin Contributor Joseph Scott

    (@josephscott)

    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.

    Plugin Contributor Joseph Scott

    (@josephscott)

    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?

    Thread Starter agreda

    (@agreda)

    …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.

    Plugin Contributor Joseph Scott

    (@josephscott)

    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.

    Thread Starter agreda

    (@agreda)

    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: https://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.

    Plugin Contributor Joseph Scott

    (@josephscott)

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

    Thread Starter agreda

    (@agreda)

    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.

    Plugin Contributor Joseph Scott

    (@josephscott)

    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.

    WraithKenny

    (@wraithkenny)

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

    WraithKenny

    (@wraithkenny)

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

    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!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Unexpected Output During Akismet Activation’ is closed to new replies.