Debugkit loaded and routes are showing but cake icon is missing on PHP 8.1.7

Hi can someone confirm if the Debugkit is working on this PHP 8.1.7 version, I have tried it with PHP 7.4 and it worked flawlessly on initial install. For PHP 8.1.7 I have followed all the suggestion like installing sqlite, adding the “com” tld as safe and enabling debug to true the homepage is showing that it can connect to database however the cake icon is disabled on the bottom right of the screen just showing arrows but no panels.

It looks like you’ve installed it correctly and what you’re seeing is the form protector / csrf (or authorisation) stepping in and blocking the debug button. You could try F12 & view source / or try selecting that text & copying it to see what it says.

I’ll dig up my code when I saw this and will edit this post when I find my solution.

Edit: OK, found it. In your /config/app_local.php add the line 'DebugKit.ignoreAuthorization' => true, to the return { ... } declaration. Something like: -

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

Obviously turn set these to false in production, this is just for development.

1 Like

Hi Jawfin, thanks for the reply I added the code to my app_local.php and still getting the same response no icons but the source is showing it is loaded :

I even tried adding the code to bootstrap.php Configure::write(‘DebugKit.forceEnable’, true);
Configure::write(‘DebugKit.ignoreAuthorization’,true); same results on both. The link on the source view is my test site debugkit is also symlink on the webroot.

Maybe its not the authorization its having an issue on.
But what that 4 way scroll boxes tells me is instead of a neat little cake image it’s got a stack of text, most likely some kind of error message. In a Chromium browser do a right-click on it and select “view frame source” - or find some other means to get to see what that little box contains, like right click & inspect and check the text in the <span>.

Also check the application’s error/debug logs (logs/error|debug.log).

1 Like

Hi Jawfin, when I clicked inspect it shows that iframe is loaded correctly however there’s a certificate error which prevent the content.bundle.js from loading from this site: which triggers the csrftoken I’m not sure if this is what you are looking for pls. see screen shots.

by the way my test site is running here:

debug log is uninteresting for this issue this time as it doesn’t show anything related to the debugkit error at the moment - can you suggest specific pattern that I need to look for on the debug log?

@Jawfin when running the site on http the certificate error is gone however this one shows up. I’m not sure how to fix it though.

I think you’ve crossed my level of expertise!

But if its crying about certificates then on your dev machine disable any SSL and don’t connect with HTTPS

If it’s not that I’m sorry but you’ll have to wait for someone else to field this.

1 Like

Thanks for the help, even if I run it on http it still doesn’t load so something is not in order at this time for PHP 8.1. I’ve tried it with PHP 7.4 and I can confirm that it works flawlessly on initial install.

Not really, no. Just empty both the error.log and the debug.log files if they exist, then open the website and see if any errors are being generated.

That being said, the link you’ve provided works fine, so I assume you’ve already solved the problem?

Hi @ndm , only the cakephp install works fine, not the debugkit plugin - it’s still broken on my test site running php8.1-fpm on Ubuntu 22.04 but on my windows10 PHP 7.4 on xampp its fine.

The debug kit toolbar was working fine when I looked at your site an hour ago. Currently a request to the toolbar returns the home page contents.

Maybe you have some caching/routing related issue on your server.

Now it’s working fine again, so yeah, on the surface that kinda looks somewhat caching related. If you’re using route caching (second argument for the routing middleware constructor) or a caching proxy, disable it.

1 Like

@ndm thank you very much for pointing that out I have to test it on pingdom to verify what you are seeing which strangely doesn’t work properly on all my browsers the test server is running behind my pfsense firewall which doesn’t have proxy enabled. So i re-checked the apache virtual host settings and I somehow enabled mod_cache on Apache server which is causing the issue when CacheQuickHandler is turned Off. OK so now, I can confirm that this is not a PHP or debugkit issue but server configuration mishap. Thanks everyone for the help - consider this issue as resolved.

1 Like