Setting up FirePHP with CodeIgniter
I have been using FireBug for some time now. Although his prime purpose is for JavaScript debugging I use it mostly for fast drilling down to CSS stuff. I just love the possibility to change, delete or add CSS properties on HTML document on the fly. Anyway I like FireBug. In absence of one for all IDE it’s quite decent solution for debugging.
Contrast to JavaScript development I do a lot of PHP development. Sadly to say, I am hugely disappointed to PHP debugging solutions. I know there are few solutions out there like XDebug but they are simply no match to Microsoft’s Visual Studio debugger. Anyhow, a free is a free so be grateful.
Currently I’ve been working on a project that will use CodeIgniter as it’s framework, It’s my first project and my first MVC application from ground up. To make my life easier, I decided to download and install myself an FirePHP extension for Firefox and FirePHP library.
Here are few steps you need to take in order to install FirePHP to work with CodeIgniter
- Download and install FirePHP extension from net (link)
- Download FirePHP library from their official site (link) and save it to some local folder
- Download CodeIgniter stuff for FirePHP from CodeIgniter site (link, or use direct link to version 0.1.1 as of time of this writting, link)
- Extract FirePHP library you downloaded in step 2 and only copy FirePHP.class.php to CodeIgniter /application/libraries/ folder, but give it a name FirePHP.php without the class part
- Extract the file you downloaded in step 3 into appropriate CodeIgnite folders. Please rename original /application/controler/welcome.php to _welcome.php just in case for backup purpose
- You are almost done. Now you need to be sure that PHP’s output buffering setting is turned on. I use WAMP package so turning this option on means clicking on WAMP icon in tray area, then selecting PHP > PHP Settings > Output buffering
- Start your Firefox, click the FireBug icon on the bottom lower area, or go to menu and select tools. After you turn on (set them to enable) FireBug and FirePHP, be sure to click on the Net tab next in line to HTML, CSS, Script, DOM and set it also to enable.
- Thats it. Your FirePHP should work now. Refreshing firefox window and clicking on FireBug’s Console tab should give you “hello” message. This “hello” comes from the welcome.php file located in archive file we downloaded in step 3.
It took me few minutes to figure some of this things out by myself since online documentation that goes with these files does not give step by step instructions.
This walk trough worked for me, so I hope it will work for you as well. If you have any questions, feel free to mail me using Contact menu at the top if the page. I’ll try to answer as soon as possible, no guarantees since I’m quite short on time.
Hope this was helpful.







Hi, I found your blog on this new directory of WordPress Blogs at blackhatbootcamp.com/listofwordpressblogs. I dont know how your blog came up, must have been a typo, i duno. Anyways, I just clicked it and here I am. Your blog looks good. Have a nice day. James.
Hey,
Thanks for the tutorial, I have been trying to get firephp working on CI for a little while, it seemed as though the project was abandoned.
thanx alot. it was very helpful to me.
there was only a small issue when i tried your recipe.
FirePHP.php in libraries folder doesn’t work correctly.
so i change the name to Firephp.php and works fine.
Just An FYI.
Thank You for tutorial.
hi…..thanks for the tutorial…i am not able to get this work with codeigniter 1.7 i am get a error regrading the parent controller which need to be changed from
parent::Controller (); to parent::MY_Controller(); in the controller as per the instruction in http://codeigniter.com/wiki/Fire_Ignition/ can u please help me out in this