TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
New: KO3 FirePHP and Profiler
  • Hello, may I introduce... KO3 FirePHP and Profiler Version 0.1 http://github.com/jeremyf76/KO3_FirePHP

    Based on these works:
    Fire_Profiler by dlib: http://learn.kohanaphp.com/2008/07/21/introducing-fire-profiler/
    and
    KO3 conversion by ralf: http://code.goldenzazu.de/fireprofiler.php

    * Works with 3.0.3!!!
    * Cleaner, extensible, KO3 styled code
    * Kohana Log support

    Get it here: http://github.com/jeremyf76/KO3_FirePHP
  • Looks great!

    I'll give it a try next time I have AJAX to debug

  • I like the cleaner integration into KO3 too. I will give it a try asap.
  • Version 0.2 is now available

    Many many bug fixes, database queries now show up and works as expected.

    ***Note: Firephp needs to be placed above the database module in the bootstrap in order to overload the db classes

    • Fixed database queries, can choose to group them together under the database benchmark
    • All FirePHP helper methods are now chainable, fb is still a direct call and not chainable...
    • Many more bug fixes

    So now you can do this:

    FirePHP_Profiler::instance()
        ->group('KO3 FirePHP Application Profiler')
        ->post()
        ->get()
        ->session()
        ->cookie()
        ->database()
        ->benchmark()
        ->groupEnd();
    
  • Version 0.3 is now available http://github.com/jeremyf76/KO3_FirePHP

    • More bugs fixes, tweaks, and features...
    • Auth Support - make sure only authorized users see firephp messages
    • New static function helper class

    I also started the wiki: http://wiki.github.com/jeremyf76/KO3_FirePHP/

      // New easier to type syntax
      Fire::log('Hi Mom!');
    

    ...its a work in progress.

  • Is this a toolbar or only a firephp via firebug integration ?

  • Brilliant. This will be very helpful. Thanks!
  • I have activated your module in my Kohana 3 Install.
    Unfortunately it gives me an Info: "FirePHP Initialized..." on every request I make, when I load it in Bootstrap.
    Is there any way to turn this off?

    I did remove the following line:
    Kohana::$log->add('FirePHP::INFO', 'FirePHP Initialized...')->write();

    Before even gave me two messages per Request.
  • Okay, it was issued in Vendor_FirePHP->_init().
    No idea why my grep search didn't find it...

    Thanks for the nice module!
  • Very useful.... this would be a great addition to the module repository on redmine.
  • It would be nice if there was a method exception() (taking one exception argument) that can dump out data in a similar format as the standard error page in Kohana.


    Edited: Wow... already included - this is great!
  • Fantastic. Well done. This is absolutely perfect for my needs. We don't need a debug toolbar anymore... :)

    Thanks.

  • I can't get it working. I did exactly as example_bootstrap.php says but can't get output in Firebug console. In my bootstrap.php:

    Kohana::modules(array(
    'firephp' => MODPATH.'firephp', // FirePHP library
    'codebench' => MODPATH.'codebench', // Benchmarking tool
    'database' => MODPATH.'database', // Database access
    ...etc
    ));

    /**
    * Attach FirePHP to logging. be sure to enable firephp module
    */

    // Exclude all FirePHP console logs from the file log...
    Kohana::$log->attach(new FirePHP_Log_File(APPPATH.'logs'));
    Kohana::$log->attach(new FirePHP_Log_Console());

    Then I made my controllers extend FirePHP ones:

    class Controller_Website extends Controller_Template_FirePHP {
    ....something
    }

    No errors, exception and so. Just blank console window no matter what's happening. Kohana version 3.0.7. How to get it working properly?
  • Do you have FirePHP installed in Firefox and is it enabled? Open the Firebug Console, and click on the Blue Bug icon in the menu bar. Make sure it is enabled. I believe it requires the Net tab to be enabled as well.

    Then try to output something to the console:

    Fire::info('something');
  • Are you by chance are using FF 4 and forcing FirePHP install? That's what I did and FirePHP 0.4.3 extension won't work, but FirePHP 0.4.4rc2 does.

    If you followed everything right, you should see a bunch of "X-Wf-" headers on the Net panel of the page.

    Second, to check you configured Kohana stuff right, check your logs file after calling a bunch of Kohana::$log like in example_bootstrap.php. If you see FirePHP entries in your app logs file, then I really think it's your FF problem.
  • So it looks like http://learn.kohanaphp.com is officially offline. Too bad some of the articles weren't archived somewhere.
  • @neovive: Everything is cached. Find what you're looking for and save it.