Blog Workshop Wiki About Me

Archive for the ‘PHP’ Category

Integrating FirePHP for Ajax Development
As mentioned in a previous post I wrote a column for php|architect about how FirePHP can be used for Ajax development. I am re-publishing the complete article here. Enjoy!

FirePHP for Ajax Development

There are many integrated development environments and tools available to aid in building Web 2.0 AJAX applications with PHP, but nothing comes close to the ease of use and tight Firebug integration that FirePHP provides.
PHP: 5.2+
Other software: Firefox, Firebug
Useful/Related links:

My purpose in this column is to introduce you to FirePHP, the problem it solves, and how it is intended to work within your application for maximum benefit. I will present some useful high-level knowledge to make it easier for you to integrate FirePHP into your application.

This is not a step-by-step tutorial. I have made a complete demo available for download, along with some useful libraries illustrating all the concepts covered here. I want to emphasize that the demo is only one possible implementation. There are many other possibilities.

Continue Reading »

FirePHP for Zend Server

I recently discovered Zend Server and the free Community Edition which I think is a great development. We finally have a standard platform to code against. Not so much in terms of the bundled install of PHP and apache which has been offered for a while; but rather in terms of a standard directory structure, configuration and web-based administration system. More on that later.

Better yet this PHP environment bundle is backed by Zend which means it will stay maintained and likely make it into many corporate environments. It also ships with Zend Framework and PEAR which means it has full native FirePHP support right from the start! If you need another reason it also installs nicely alongside your existing Apache/PHP install without any conflict out of the box. There is really no reason why you cannot run Zend Server in parallel to your existing setup.

I am going to walk you through how you can get FirePHP setup for ZendServer with the help of some glue code. The glue is available from the FirePHP PEAR channel and will be maintained along with FirePHP going forward. At the end of this tutorial you will have FirePHP available automatically for any Apache vhost you configure on your Zend Server.

Continue Reading »

FirePHP column in November php|architect

The November issue of php|architect is finally out. Why is this exiting for me? Because I had something to do with it:

/etc: FirePHP for Ajax Development

Firebug is without doubt the most popular development tool among Firefox plugins. Christoph Dorn thought it would be nice to have PHP integration for it.

by Christoph Dorn

Continue Reading »

FirePHP 0.2 Released

I have released a new version of FirePHP. You can download it here. It will also be available on the Mozilla Add-ons site in a few days.

The release includes 27 bug fixes and feature enhancements. The scope of this release was primarily focused on improving the current feature set in terms of usability, reliability and support for logging complex objects. You can find the changelog here.

Continue Reading »

Your Mac can talk FeedBurner stats via PHP!

You have a blog and you are proud of it. Your sense of self-worth depends on how many people are following it. Making a detour to FeedBurner every day (the feed stats only update once a day) to check on your vitals is simple and does not take long (with a bookmark) but there has to be a more automated way.

What if you could just think “I wonder what my stats are today?” and your Mac would tap into your mind and give you the answer. It’s probably a good thing it has not advanced that far yet.

But what if you could ask your Mac and it would answer?

Well … It can! The needed speech tools are built right into Mac OS X.

Continue Reading »

Recursiveness: CakePHP Set::extract() and JSONPath

Just ran across this post where Felix shares some wisdom he gained while re-writing CakePHP’s Set::extract() (code) method to make it faster and add some XPath 2.0 support.

If you need a function to have the highest performance, try to express it non-recursively. It can make a 500% difference.

Now I thought the 500% speed gain (and associated fewer CPU cycles) was a number he grabbed out of the air or it was based on comparisons with the previous Set::extract() method and very specific to that case. It surely would not apply to any algorithm in general as some are much more complex than others.

Continue Reading »

FirePHP and Zend Framework 1.6

The long awaited day has arrived. Zend Framework 1.6 just shipped and with it native support for FirePHP!

This means that if you use Zend Framework (ZF) you can now log to your Firebug Console via FirePHP without needing to download any other PHP files such as the FirePHPCore library.

There are two primary components available at this time. One is the Zend_Log_Writer_Firebug and the other the Zend_Db_Profiler_Firebug.
Continue Reading »

FirePHP for legacy code

I stumbled across this post during one of my “firephp” google searches.

I find it great for inherited websites where I need to troubleshoot problems on live servers, as I can have all the debug/variable dump/etc crap dump to the FirePHP console so it doesn’t show up on the website while I’m trying to track down a problem and the budget is not there to make a dev copy of the system[they need an in and out fix, 4 hours tops]

It illustrates a great use case. Many times you need to maintain legacy code that you don’t have a development environment for. FirePHP enables you to do ad-hock debugging on a live site without affecting site visitors as long as you are careful not to cause any parser errors. Maybe not a great idea on a high-traffic site, but chances are if the site runs on more than one server or has a lot of traffic the owners will be able to afford a development environment for you.

It may also be a great tool for helping you convert PHP4 applications to PHP5.

Wordpress Forged
Creative Commons License
Copyright © 2008 - 2010 Christoph Dorn