• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

WordPress “The plugin generated xxxx characters of unexpected output during activation”

September 11, 2012 by Webhead

Problem

I was developing a plugin for wordpress and receive a messsage:

The plugin generated 496 characters of unexpected output during activation

Solution

I placed the following code at the end of my plugin file,

update_option(‘plugin_error’,  ob_get_contents());

then looked in the wordpress options table using the query

“SELECT *
FROM `wp_options`
WHERE option_name = ‘plugin_error'”

Then I could see what the unexpected output was.

Or I could’ve installed the WH Debug plugin and just added this to the end of the plugin file:

wh_debug( ‘plugin_error’, ob_get_contents());

And then viewed it in the WordPress admin pages under Tools->WH Debug.

 

source: http://hungrycoder.xenexbd.com/wordpress-2/how-i-have-solved-the-the-plugin-generated-xxxx-characters-of-unexpected-output-during-activation-problem.html

keywords: wordpress characters of unexpected output during activation

 

Filed Under: Coding Tagged With: debug, mysql, php, wordpress

Primary Sidebar

Topics

502 apache apple bluehost bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git goDaddy google google analytics google maps hacked hosting htaccess html html 5 icons IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php tinymce wordpress wpengine yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools