Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Henry Hayes' Blog:
Firebug Console.Log for PHP using Zend Framework
Jun 15, 2011 @ 17:49:27

Henry Hayes has written up a handy post to his blog looking at using FirePHP and Zend_Log_Writer_Firebug to log messages directly to your Firefox's Firebug console.

Due to sloppy programming in the past many PHP error logs can become very clogged up and, unless you use some fancy grep technique, unusable. [...] A project has been around for some time now called FirePHP. This enables us to log messages of various levels of severity to the Firebug console! - Awesome. Just imagine if you are developing an ajax app, you could have all your debug messaging in one place.

He walks you through the steps needed to get the logging up and running - setting up FireBug (if you don't have it already) and FirePHP, editing your Zend Framework bootstrap file to add an _initLogging() method and using it for logging, both in the backend script and on the frontend in the console. He also includes a quick update to the logging method that only logs to the Firebug console if the environment is not production.

tagged: firebug consolelog firephp zendframework logging writer

Link:

Slawek Lukasiewicz's Blog:
Zend Framework: logging with Firebug and FirePHP
May 24, 2011 @ 14:44:46

Slawek Lukasiewicz has a new post to his blog today showing you how to use the popular Firebug extension for Firefox with the FirePHP plugin to make error logging simpler and less obtrusive without ever having to leave the browser.

If you use Firefox, I bet you already know Firebug extension. This is irreplaceable tool for web development. But there is also FirePHP extension, which provides possibility to log into Firebug console from PHP scripts. This is very convenient way for debugging process, because logs are independent from application output.

He shows the integration you can do with the Zend Framework's Zend_Log component to write basic messages and the Zend_Wildfire component to write tabular data back to your browser's console with two snippets of code.

tagged: logging firebug firephp tutorial zendframework zendlog zendwildfire

Link:

Christoph Dorn's Blog:
FirePHP on Magenting
Dec 17, 2010 @ 16:08:47

Christoph Dorn has a new post to his blog today about using the FirePHP extension for Firefox/FireBug to help debug applications running on the Magenting service.

FirePHP can be useful when debugging remote PHP applications on shared or dedicated servers. This tutorial illustrates how to setup FirePHP 1.0 on Magenting which is a managed Magento hosting service. Go to http://magenting.com/ and create an account. This tutorial was prepared by using a Spark account, but it should work just the same with all plans.

He walks you through all the steps you'll need - getting the FirePHP extension installed, getting the PHP libraries set up on the remote server and configuring it to work with your application. A snippet of code is included that can be used to test the connection.

tagged: firephp debug tool firefox firebug tutorial magenting magento

Link:

Christoph Dorn's Blog:
FirePHP 1.0 in 5 Steps
Nov 30, 2010 @ 14:23:59

Christoph Dorn, author of the FirePHP tool for interfacing your PHP applications directly with Firebug, has written up a guide to help you get started using the latest version in five easy steps.

Get started with FirePHP 1.0 in 5 steps. Why upgrade? Check out the new features.

The steps are simple (it's a pretty easy tool to use):

  • Install the FirePHP Companion
  • Install FirePHP
  • Use the sample code to include in an application
  • Authorize the client
  • Log a test message (code snippet included)

You can find out more about the FirePHP project on the project's site.

tagged: firephp extension firebug debug version

Link:

Christoph Dorn's Blog:
Introducing FirePHP Companion
Aug 23, 2010 @ 15:12:31

Christoph Dorn has a new post to his blog about a tool he's released to compliment his FirePHP - the FirePHP Companion.

When I originally wrote FirePHP in 2007 I had big ambitions as to the features I was going to incorporate. [...] What I needed was a wholistic approach to the problem area of server-side application intelligence and a set of libraries based on standards that could be applied cross language. After countless hours of research and development I am pleased to announce the first fruit of my labor.

The the post includes all of the instructions you'll need to get this new tool up and working with your site. There's also a screencast on the documentation that walks you through everything too.

tagged: firephp companion tool firebug

Link:

Sameer Borate's Blog:
Benchmarking Wordpress SQL using FirePHP
Feb 15, 2010 @ 16:47:12

WordPress users out there might find the latest post from Sameer Borate interesting if they're looking to squeeze the most performance out of their installation. It's a guide to using the FirePHP plugin for Firefox to benchmark your WordPress install's SQL.

The first thing you can do to rectify the situation is to find out where exactly the bottleneck resides by analyzing the time each SQL query takes to executes. Some inquisitive people among you may also be interested in knowing in what sequence the Wordpress SQL queries themselves are being run.

His method of benchmarking the SQL for the application uses some of the built in query logging in WordPress and some code dropped into your footer of your template to grab that information and push it back out to the waiting FireBug panel in your browser. The result looks something like this.

tagged: wordpress sql benchmark firephp firebug

Link:

SitePoint PHP Blog:
Debug PHP with Firebug and FirePHP
Feb 09, 2010 @ 15:13:40

bOn the SitePoint PHP blog today there's a new post showing you how to debug applications with FirePHP (an extension of the popular Fireug extension for Firefox).

By combining this extension, which sits on top of Firebug, with a server-side library, your PHP scripts will be able to send debugging information to the browser, handily encoded in the HTTP response headers. Once you’re set up, you can log warnings and errors in your PHP scripts to the Firebug console, just as if you were developing JavaScript.

Once you've installed the extension and grabbed the FirePHP library, you can follow along with their example showing the push of a simple message - in this case array values - out to your browser and into the Fireug panel.

tagged: debug firebug firephp tutorial

Link:

Ryan Mauger's Blog:
Keeping your html valid with Zend Framework, Tidy and Firebug
Jan 29, 2010 @ 19:54:38

Ryan Mauger has a new post today looking at how to combine the Tidy extension for PHP and Firebug with a Zend Framework application to keep your HTML neat and valid with a handy bit of feedback for debugging.

With Zend Framework there is an easy way to ensure that you always create valid HTML in your applications. This involves the use of a simple Front Controller Plugin, and the php Tidy component. [...] So you can use tidy for filtering user input, what about using it to effectivly clean my documents and ensure my output is always valid?

He starts off with the pieces of the puzzle you'll need - the front controller plugin for the Zend Framework application, using the Tidy extension to filter your HTML and combining the two to make a dispatchShutdown() call to make the transformations. Firebug comes in to help with logging the issues Tidy found so you can correct them.

tagged: zendframework tidy extension firebug tutorial

Link:

phpRiot:
Zend Framework 101: Zend_Log
Apr 13, 2009 @ 13:46:13

Next up in the phpRiot "Zend Framework 101" series is this new look at the logging component of the Zend Framework - Zend_Log.

This article shows you how to use Zend_Log, the logging component of the Zend Framework. It allows you to record messages from your application however you please. In this article I will show you how to record messages to a log file. Additionally, if you use the Firebug and FirePHP plug-ins for Firefox, Zend_Log can be extremely useful for application development and debugging. I will also show you how to achieve this.

They walk you through the creation of a simple logger and putting it to use by recording just the events you want (via error levels). There's also an extra section on integrating it with the Firebug/FirePHP extensions for Firefox and push your messages directly to the browser.

tagged: zendframework zendlog tutorial introduction logger firebug firephp writer

Link:

Juozas Kaziukenas' Blog:
Debugging with FirePHP and Firebug
Mar 13, 2009 @ 13:45:52

In this new post Juozas Kaziukenas takes a look at a very useful debugging tool that can help keep your debug messages and errors out of your page and into a proper debugger - FirePHP (an extension of Firebug).

One may debug his application with print(") statements all other the place or alert(") for JavaScript. Luckily some years ago Firebug extension for Firefox was introduced, which introduced (?) console. Console works absolutely the same as in Linux and can be used not only to execute commands, but receive information from various sources.

He shows what the output looks like both on the interface side (in the Firefox plugin) and in the HTTP headers that are sent back along with the web server's response. Some frameworks even have components that let you interface with it directly.

tagged: debug firefox firephp firebug example interface extension

Link:


Trending Topics: