Wednesday, December 3, 2014

Install DebugKit for Cakephp 2.5

Debugging in Cakephp is made easier with the DebugKit. Here are steps to install the DebugKit on Centos 6 and CakePHP 2.5.6.

Following are notes based on installation instructions from the Debugkit site.

Step 1: Install CakePHP 2

See previous posting on Installing Cakephp.

Step 2: Download and extract

Read the instructions from DebugKit from Github then download and extract to the cakephp folder app/Plugin.

cd /var/www/html/cakephp-2.5.6/app/Plugin
unzip debug_kit-master.zip
mv debug_kit-master debug_kit
chown -R apache debug_kit-master

Step 3: Configure CakePHP

In app/Config/bootstrap.php add following line;

CakePlugin::load('DebugKit');

In app/Controller/AppController.php edit the class with the array line;

class AppController extends Controller {
         public $components = array('DebugKit.Toolbar');
}



In app/Config/core.php change debug from 2 to 1
         Configure::write('debug', 1);

Note: The Make sure to remove the 'sql_dump' element from your layout (usually app/View/Layouts/default.ctp)

In a web browser open the cakephp site to confirm if Debugkit is available. e.g. http://localhost/cakephp-2.5.6



No comments:

Blog Archive