I am trying to make it so that I can output to the console in PHP. I have already installed FireFox with the FireBug and FirePHP addons.

I downloaded the 'FirePHPCore Server Library' from here and I uploaded it into 'wp-content/themes/Jupiter/includes' (my theme is called Jupiter).

Then, from within the loop of a template page, I wrote the following code:


FB::warn("Warning message!");

I have tried to put the includes in functions.php and I have tried using the OO/Procedural calls and nothing seems to be working. What am I missing? Is there an easier way of doing this?

Warning Information

I turned wp_debug on in order to get the following output when attempting to add a debug line:

Fatal error: Uncaught exception 'Exception' with message 'Headers already sent in /home5/alumnicl/public_html/beta/main/wp-content/plugins/jupiter-framework/jupiter-framework.php on line 32. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.' in /home5/alumnicl/public_html/beta/main/wp-content/themes/Jupiter/includes/FirePHPCore/FirePHP.class.php:1178 Stack trace: #0 /home5/alumnicl/public_html/beta/main/wp-content/themes/Jupiter/includes/FirePHPCore/FirePHP.class.php(757): FirePHP->newException('Headers already...') #1 /home5/alumnicl/public_html/beta/main/wp-content/themes/Jupiter/includes/FirePHPCore/fb.php(64): FirePHP->fb('hello world', 'Message Title') #2 /home5/alumnicl/public_html/beta/main/wp-content/themes/Jupiter/control-display.php(28): fb(Array, Array) #3 /home5/alumnicl/public_html/beta/main/wp-includes/template-loader.php(47): include('/home5/alumnicl...') #4 /home5/alumnicl/public_html/beta/main/wp-blog-header.php(16): require_once('/ho in /home5/alumnicl/public_html/beta/main/wp-content/themes/Jupiter/includes/FirePHPCore/FirePHP.class.php on line 1178

I have already included ob_start() directly before the require statement - should I be putting it somewhere else?

2 Answers 2


I use it including the file (Match you actual file location):

require '../../FirePHPCore/fb.php';

and then call by using

fb( $variable, 'Message Title');

Be sure that you've installed and activated the FirePHP addon on Firefox.

There's also a WordPress plugin for FirePHP, but I've never used it.

  • That's basically what I've done already - check out my update with the wp_debug output -
    – William
    Apr 9, 2013 at 5:16
  • Do you have any spaces before <?php at the start of your file?
    – RRikesh
    Apr 9, 2013 at 5:20
  • Since you're using it in your include files, I can't say for sure. But you should send your logging messages well before you start sending your actual HTML.
    – RRikesh
    Apr 9, 2013 at 5:30

Like RRikesh said, you need to put your include and buffer statement before any HTML is sent to the client. In other words, this probably needs to go in the top of your header.php file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.