Reputation: 2435
I have had difficulty getting DebugKit configured with CakePHP. I've read the answer here: How to Install DebugKit on CakePHP but it doesn't seem to have helped.
Here is what I have done so far:
Created a directory called DebugKit in app/Plugin
Downloaded all the files from Git (They come in a folder called debug_kit but I just copied all the files in that folder and placed them in my newly created DebugKit folder)
Uncommented the line CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit in Bootstrap.php
My AppController Class now looks like this
class AppController extends Controller {
public $components = array('DebugKit.Toolbar');
}
My Core.php has this line:
Configure::write('debug', 1);
And I have commented out this line in the file default.ctp
<!-- <?php //echo $this->element('sql_dump'); ?> -->
The error message I receive is:
Error: The application is trying to load a file from the DebugKit plugin
Error: Make sure your plugin DebugKit is in the app\Plugin directory and was loaded
I have been URL Rewriting enabled as per these instructions: http://book.cakephp.org/2.0/en/installation/url-rewriting.html#apache-and-mod-rewrite-and-htaccess
And my Web application directory structure looks like this: Wamp/www/cakephp/
I also notice that there is a folder called plugins at this location: cakephp/plugins - I have tried copying the downloaded plugin to that location but it doesn't work either.
Any suggestions would be greatly appreciated.
L
Upvotes: 2
Views: 4440
Reputation: 165
If you are using cakephp2.x, you need to load the plugin in cake/app/config/ bootstrap.php file.
you will find the lines will look like
*CakePlugin::loadAll(); // Loads all plugins at once *CakePlugin::load(’DebugKit’); //Loads a single plugin
then you have to copy paste the code without the * symbol
CakePlugin::loadAll(); // Loads all plugins at once CakePlugin::load(’DebugKit’); //Loads a single plugin
this works for me
Upvotes: 2
Reputation: 1774
make sure that the name of directory where debugkit resides
the right name is DebugKit
app/Plugin/DebugKit
Upvotes: 0
Reputation: 2435
This was a very silly mistake of mine - I had just uncommented the line CakePlugin::load('DebugKit'); in the bootstrap.php file but it was still surrounded by a comment block, so uncommenting the line took no effect. Silly me.
Upvotes: 2