FirePHP and CakePHP-Facebook-Plugin class collision

This took me an awfully long time to debug, but if you happen to be using both the CakePHP Facebook Plugin and FirePHP version 0.3.2 Server Library, you will get “redeclaration” errors if you try to include both FirePHP and the Facebook Connect component. This is because they both declare a FB() class.

Eventually the solution was simple, just rename all instances of the FB class in the FirePHP code, to “FireBug”. I did this for the PHP5 version only, since I didn’t care about PHP4. Zipped and attached if you’d like to use it.

FirePHPCore-patched.zip

Leave a comment

Your email address will not be published. Required fields are marked *