Problem with getting FirePHP to work with Zend Framework

5 messages Options
Embed this post
Permalink
Justin () Problem with getting FirePHP to work with Zend Framework
Reply Threaded More More options
Print post
Permalink
I'm trying to get FirePHP working with ZF and for the life of me can't figure out what I'm doing wrong.  Your tutorial seems pretty straightforward but maybe I'm missing something.

I'm running 1.6 and pass this in my bootstrap:

$logger = new Zend_Log();
$writer = new Zend_Log_Writer_Firebug();
$logger->addWriter($writer);
Zend_Registry::set('logger',$logger);

Then in my action I call

$logger = Zend_Registry::get('logger');
$logger->log('This is a log message!', Zend_Log::INFO);

I've ran print_r on $logger and know my object is setting up fine and I'm not receiving any error messages but don't see anything in Firebug's console.  I have the Net panel enabled and my user agent is "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 FirePHP/0.2.1".  

Any suggestions would be appreciated. :)
Christoph Dorn () Re: Problem with getting FirePHP to work with Zend Framework
Reply Threaded More More options
Print post
Permalink
What response headers are you getting?
Justin () Re: Problem with getting FirePHP to work with Zend Framework
Reply Threaded More More options
Print post
Permalink
Here are the headers, hopefully they display right.

Response Headers

Date : Wed, 21 Jan 2009 17:33:10 GMT
Server : Apache/2.2.6 (Win32) PHP/5.2.6
X-Powered-By : PHP/5.2.6
Expires : Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control : no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma : no-cache
Content-Length : 1220
Keep-Alive : timeout=5, max=100
Connection : Keep-Alive
Content-Type : text/html

And the request headers if they help:

Request Headers
Host : puma.jpk.zeus.sgi
User-Agent : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 FirePHP/0.2.1
Accept : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language : en-us,en;q=0.5
Accept-Encoding : gzip,deflate
Accept-Charset : ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive : 300
Connection : keep-alive
Cookie : __utma=221441945.2798463017888758300.1220804424.1232474098.1232555277.273; __utmz=221441945.1220804424
                  .1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=106572936.3701692032771811000.1227191152.1227191152
                  .1227191152.1; __utmz=106572936.1227191152.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); PHPSESSID
                  =b57fn60dkdh74verrm8jlkmld4; __utmc=221441945
Cache-Control : max-age=0
Christoph Dorn () Re: Problem with getting FirePHP to work with Zend Framework
Reply Threaded More More options
Print post
Permalink
Nothing is being sent to the browser.

Any chance you can try this with a more recent version of ZF before I try and figure out what could be wrong?
Justin () Re: Problem with getting FirePHP to work with Zend Framework
Reply Threaded More More options
Print post
Permalink
Found my problem it was my own fault, ironically enough caused by something I'm planning on eliminating with firephp.

In my code I was calling die() in the action to get around creating a view.  In doing so, I never allowed for the logger to actually output the data to php bug.   The "nothing is being sent to the browser" tipped me off, thanks for pointing me in the right direction.  

Hopefully this post will help someone with a similar problem.