This is a very first stab at a plugin that provides FirePHP integration for Moodle. It follows a similar approach as the one suggested in MDL-16371 but instead of patching core Moodle code it follows a modular plugin approach.
That way, it can provide some basic access control and configurabiltiy.
Basically, the plugin does the following:
1) integrating the FirePHP Core Library from http://www.firephp.org
2) dumping the content of the four global Moodle variables ($CFG, $SITE, $USER and $COURSE) to the FirePHP console, where they can be inspected using FirePHP's powerful Variable Viewer (see screenshot)
3) redirecting error and exception handling to Firebug
For more information see:
The plugin still leaves much to be desired:
* better configurability (at the moment the plugin can only be globally activated/deactivated site wide)
* better integration with build in Moodle debugging features
* full use of language strings for localisation
Any comments and suggestions for improvement are welcome!
You can download the code under www.nakohdo.de/downloads/firephp.zip
Here's a short instruction on installing the plugin (taken from http://dev.moodle.org/mod/forum/discuss.php?d=363&parent=805):
For properly installing and enabling the plugin do the following:
1) Click on "Notifications" in the Site Admin menu
2) Enable the plugin under Modules > Blocks > FirePHP
3) The plugin is a block, so you have to turn Editing on and add the FirePHP block to a course. The block only shows whether FirePHP is activated or not.
4) For security reasons the block will only be active for users with administrator rights.
There are still some problems regarding output buffering. So if you got an error message you might try setting output_buffering = On in the php.ini file (note: for XAMPP this file lives in \apache\bin\php.ini). See also Installing Moodle/Creating custom php.ini files.
And here's the discussion about that issue from the FirePHP forum:
"FirePHP on Frameworks which makes use of ob_start()"
How do you add the FirePHP block into a course? Is it an activity or Resource?
But now an error appears when I try to add the block:
Fatal error: Exception
thrown without a stack
frame in Unknown on
This is also stopping me to add more blocks to my moodle pages because it replaces the add block dropdown list. I have my debugging options set to NORMAL. If I take the debugging options off the add block just disappears along with the error message.
I'm currently using Moodle version 1.9.4
I recently very gald of finding the FirePHP-Plugin for moodle, because I already tried to get FirePHP working by editing the moodle php code but it didn't work. (I'm a student of software engineering and woking on my term paper now. For that I need to modify the assingment module of my moodle installation.)
Now I moved the FirePHP-code to the folder \blocks and turned it on (as mentioned in the above). But as I added the block to my curse I got the same error than Pedro did.
Fatal error: Exception thrown without a stack frame in Unknown on line 0
And nothing happens now in the Firebug console window when I do anything. Is there a fix now?
Kind regards, Markus
Sorry for my late reply. Please do the following to get the plugin working:
1) Download the latest version of the FirePHP server library (FirePHPCore 0.3.2 ) from http://www.firephp.org and copy the "FirePHPCore" folder in the firephp block's folder (thereby overwriting the old versions).
2) You probably will still get an error message like the one in the screenshot which already hints at the problem. Try activating output buffering in your servers php.ini file as recommended by setting "output_buffering = ON".
- Can you put the code up on Github, so the community can help out, and for easier tracking of fixes? See Git for contrib in the Wiki.
- Can you add the plugin to the database please?
Thanks again. Best wishes,
Thanks for your interest in the plugin. You're right, that message is caused by the plugin still having passed the approval process. However, as the code lives on GitHub anyhow you can get the code from there: https://github.com/nakohdo/moodle-block_firephp
output_buffering no value no value
output_handler no value no value
For output_buffering the values must be ON?
And for output_handler wich values must be set? ON?
Thank´s in advance
Here is the Brazilian Portuguese translation for the firephp block.
I've made a slightly modified version of your block packaged as a local plugin, the idea being that it loads FirePHP in the lib.php, and the functions are then available for use in your code. At the moment, I've set it to use static calls (e.g. FB::info()) so save having to do "global $firebug;" in functions.
The disadvantages are that you can't automatically log $COURSE since lib.php is executed before it's set up, and you can't (as far as I can tell) enable error and exception handling.