firePHP with custom error_handler, exception_handler and pear_handler

5 messages Options
Embed this post
Permalink
Eduard Kracmar () firePHP with custom error_handler, exception_handler and pear_handler
Reply Threaded More More options
Print post
Permalink
Hello Christoph.

This post is related to issue #29 (http://code.google.com/p/firephp/issues/detail?id=29). This is a workaround, your json_encode method is disabled and I'm using PHP's build-in json_encode().

After unpacking archive point your browser to 2 examples:
public/example_dibiphp.php
public/example_mdb2.php

Example_dibiphp.php is using promising db layer dibi (http://dibiphp.com) and example_mdb2.php  is using PEAR's MDB2 (http://pear.php.net/package/MDB2). This handler looks promising, hope that someone will find it usefull. Looking forward to your own json_encode working from the scratch. There are some minor modifications in FirePHP.class.php, just avoiding E_NOTICE messages and disabling json_encode method. Patch is included in archive.
FirePHP_with_errorHandler.tar.gz
Eduard Kracmar () Re: firePHP with custom error_handler, exception_handler and pear_handler
Reply Threaded More More options
Print post
Permalink
Small fix in uploaded archive

Requirements:
-------------

Example with mdb2 needs PEAR and MDB2 with drivers installed (or example in directory defined in include_path). If not possible, download and install directly in public folder or just use dibiphp example.FirePHP_with_errorHandler.tar.gz
Christoph Dorn () Re: firePHP with custom error_handler, exception_handler and pear_handler
Reply Threaded More More options
Print post
Permalink
In reply to this post by Eduard Kracmar
Thanks for the patch and error handlers.

Sorry about not fixing these errors in the FirePHPCore library sooner. I had a much larger update planned (and started work on it) which involves porting the ZendFramework implementation to the Core library and some cool new features for the extension but am running out of time before I leave to go traveling. So I have switched gears and will now provide a minor update to the extension and server library to try and fix outstanding bugs in the next few days.

I will not be able to work on much until early next year at which point I will complete and roll out a major update. I have also plans to update the FirePHP website to feature specific libraries (like the one you just posted) more prominently if the author can commit to keeping it current.
Eduard Kracmar () Re: firePHP with custom error_handler, exception_handler and pear_handler
Reply Threaded More More options
Print post
Permalink
No problem, I liked your library much and this was something I was looking for our applications for a long time. In this state I can use it till your update will be ready.

Thank you very much.
Christoph Dorn () Re: firePHP with custom error_handler, exception_handler and pear_handler
Reply Threaded More More options
Print post
Permalink
issue #29 should now be fixed in the 0.2 BETA release I just uploaded.

I have also added an easy way to register error and exception handlers:

$firephp = FirePHP::getInstance(true);
$firephp->registerErrorHandler();
$firephp->registerExceptionHandler();