CakePHP 2 can't find FireCake using Debug_kit

834 views Asked by At

I have been attempting to use CakePHP 2.0 and most of it works pretty well, however I have not been able to get console logging working with FireCake. I have FireBug 1.8.3 and FirePHP 0.6.2 installed in Firefox 6.0.2 and my old Cake 1.3 project works fine. For CakePHP 2.0 I downloaded the new version of DebugKit, put it in Plugins, added this to my AppController in Controllers folder:

App::import('Vendor', 'DebugKit.FireCake');

class AppController extends Controller {

public $components = array('Cookie', 'DebugKit.Toolbar', 'RequestHandler', 'Session');

and this in my bootstrap

CakePlugin::load('DebugKit');

and in core

Configure::write('debug', 2);

and then put this in one of my controller actions

FireCake::log($msg);

which generates an error like this

Fatal error: Class 'FireCake' not found in C:\Users\foo\Documents\Websites\cakephp-2.0.0.35\numbering\Controller\AppController.php on line 29

I can't figure out anything I might have missed from the instructions, so is there something duh-obvious I might be overlooking? Or some extra import that is necessary? Any help would be appreciated, thanks.

Matt

[edit]

I should add that the DebugKit menu appears as expected and functions, the problem is just FireCake.

2

There are 2 answers

1
Ber Clausen On

I believe you should use

App::uses('FireCake', 'DebugKit.Lib');

if you are on CakePHP 2.2 or higher.

0
Matt On

The documentation was incorrect for CakePHP v 2.0. This is now required:

App::import('Lib', 'DebugKit.FireCake');