FirePHP and Zend Framework 1.6

24 views
Skip to first unread message

Christoph Dorn

unread,
Sep 3, 2008, 12:18:08 AM9/3/08
to FirePHP
Zend Framework 1.6 was released today and with it full native FirePHP
support.

Read more here: http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/

This is a great milestone for the FirePHP project.

If you are involved with a framework that could benefit from FirePHP
and we don't already have a library/plugin for it (http://
www.firephp.org/Wiki/Libraries/BuildYourOwn) why not take the
initiative to write one.

If you can assist in making a tighter integration with a framework
beyond what a plugin can do by contributing code to the core of a
framework let me know. I am compiling a shortlist of frameworks that
will guide the next version of FirePHP which will bring many new
exciting features many of which have never been seen before.
Zend Framework will be one. Maybe symfony the second. It would be
great to have some people available to bounce ideas off and make
recommendations.

Thanks for your continued support and interest.

Christoph

tangfucius

unread,
Sep 3, 2008, 3:47:27 PM9/3/08
to FirePHP
Hi, I was very excited and interested when first heard about this. I
tried following the instructions and use the components.
Unfortunately it does not work. I stepped through the zend code, and
it's calling JsonStream recordMessage just fine. the messages are
recorded but not sent in the headers.

On Sep 2, 11:18 pm, Christoph Dorn <christ...@christophdorn.com>
wrote:
> Zend Framework 1.6 was released today and with it full native FirePHP
> support.
>
> Read more here:http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framewo...
>
> This is a great milestone for the FirePHP project.
>
> If you are involved with a framework that could benefit from FirePHP
> and we don't already have a library/plugin for it (http://www.firephp.org/Wiki/Libraries/BuildYourOwn) why not take the

Christoph Dorn

unread,
Sep 3, 2008, 4:41:34 PM9/3/08
to FirePHP
Are you using Zend_Controller_Front?

You need to have Zend_Controller_Front initialized with your request
and response objects before logging or log from your controllers after
the front controller is dispatched (which initializes the request and
response objects automatically).

If this does not solve it can you send me your bootstrap file.

Christoph

tangfucius

unread,
Sep 3, 2008, 5:04:06 PM9/3/08
to FirePHP
There it is. It appears that firephp, at least the zend framework
implementation, does not support logging after the dispatch process is
complete. I was doing some logging after the $frontController-
>dispatch() line. This is the reason why it didn't work.

tangfucius

unread,
Sep 3, 2008, 5:13:42 PM9/3/08
to FirePHP
Big thumbs up for the database profiling feature!

Christoph Dorn

unread,
Sep 3, 2008, 5:47:56 PM9/3/08
to FirePHP
Right. It needs to send the headers before the response object is
flushed.

I have not tested this, but if you need to send logging after the
front controller has dispatched try the following:

1) Place ob_start() at the beginning of your bootstrap file
2) Log as usual after the front controller has completed dispatching
3) Flush the headers again with:

Zend_Wildfire_Channel_HttpHeaders::getInstance()->flush();
Zend_Controller_Front::getInstance()->getResponse()->sendHeaders();

Let me know how that works out.

Christoph

tangfucius

unread,
Sep 3, 2008, 5:55:59 PM9/3/08
to FirePHP
any plans to enable logging after the frontController dispatch loop
exits? I really like FirePHP, but would like to log after the
dispatch loop as well, eg. page execution time, application shutdown
process, etc.

tangfucius

unread,
Sep 3, 2008, 6:02:28 PM9/3/08
to FirePHP
tried that. now it shows in the headers, but not in the console
window...

X-Wf-1-1-1-2 |[{"Type":"INFO"},"Page run time: 0.064071 seconds"]|

tangfucius

unread,
Sep 3, 2008, 6:30:16 PM9/3/08
to FirePHP
some more information: it shows in the console when it's the only log
recorded, if there was anything else recorded before that, then it
doesn't show in the console although it's in the headers.

Jamie H

unread,
Sep 3, 2008, 7:34:42 PM9/3/08
to FirePHP
This is a great addition to Zend!

I have just been testing it out with one of my projects and came
across a problem when profiling database queries that have parameters
containing non-standard chars (gzip data for a blob field).
I am getting the error “There was a problem writing your data from the
Wildfire Plugin”.

It doesn't appear like you can disable the sending of parameters in
the firebug headers with the Zend components. However, I modified
Zend_Db_Profiler_Firebug in my library to include a "sendParams" var
and function, and updated some of the methods to use this and it's now
working. It would be even better if I could still send these param
headers but have it ignore certain fields though, like BLOB data.

Christoph Dorn

unread,
Sep 4, 2008, 1:57:18 AM9/4/08
to FirePHP
Thanks for trouble-shooting this. I have added a ticket for it:
http://framework.zend.com/issues/browse/ZF-4181

Christoph

Christoph Dorn

unread,
Sep 4, 2008, 2:05:02 AM9/4/08
to FirePHP
Thanks for reporting this. I have filed an issue:
http://framework.zend.com/issues/browse/ZF-4182

Christoph
Reply all
Reply to author
Forward
0 new messages