4
votes

After successful installation of cakePHP via Composer no DebugKit toolbar is visible.

This is really weird cause while the installation process the following has shown:

- Installing cakephp/debug_kit (3.1.0)
  Loading from cache

config/bootstrap.php:

// Only try to load DebugKit in development mode
// Debug Kit should not be installed on a production system
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}

config/app.php:

/**
 * Debug Level:
 *
 * Production Mode:
 * false: No error messages, errors, or warnings shown.
 *
 * Development Mode:
 * true: Errors and warnings shown.
 */
'debug' => true,

Normally (manual installation), the plugin is stored in plugins-folder but it is empty.

Is there anything else I have to configure?

Kind regards,

Phil

4
Check error log for relevant errors. Ensure you have pdo-sqlite enabled. DebugKit by default uses a sqlite db. - ADmad
Error log told me that I have to install php5-sqlite package. Since I did, no errors in error log but also no debugkit-toolbar visible. - phil-in-the-blank
phpinfo: PDO PDO support enabled PDO drivers mysql, sqlite - phil-in-the-blank
After inspecting the source-code I figured out that debug kit is enabled and running but the src-location is obviously wrong: <script>var __debug_kit_id = 'cdba1a7e-a768-4917-a0ca-dc79b23351ff', __debug_kit_base_url = '10.0.0.4/test/';</script><script src="/test/debug_kit/js/toolbar.js"></script> this occurs 404 I am using cakePHP without domain name and I solved CSS and JS problems with a location block in my nginx conf: location /test/ { alias /usr/share/nginx/www/test/webroot/; } (stackoverflow.com/questions/30040999/…) - phil-in-the-blank
You should update your question with an answer and mark it. - Claudio

4 Answers

6
votes

Install the php5-sqlite extension. (this is for php5, use whatever version you are running)

If you are running on Ubuntu...

sudo apt-get install php5-sqlite

Not sure what the package name is on centos/redhat, but you can use the following command to find what the exact package name is.

sudo yum search php

Once you have the package name you can use the following to install it...

sudo yum install <Package Name> 

Don't forget to restart your web server after installing. Restart the php service as well if you are using php fpm.

3
votes

This helped me:

  1. php bin/cake.php plugin assets symlink
  2. sudo apt-get install php7.0-sqlite
2
votes

The static assets are no linked to the vendor folder.

Please run the following commands:

cd webroot
ln -s ../vendor/cakephp/debug_kit/webroot debug_kit
2
votes

You may try this:

bin/cake plugin assets symlink

Read more...