PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 17, 2022

[FIXED] Class 'SqlFormatter' is missing CAKEPHP 3 DebugKit

 January 17, 2022     cakephp, cakephp-3.0     No comments   

Issue

I've just installed the latest Debugkit from https://github.com/cakephp/debug_kit.

Everything is working. However, when I clicked on the "SQL Log", the CakePHP logo keeps spinning. I tried to debug by opening up the console.log and saw an 500 error. It shows the below.

Error: Class 'SqlFormatter' not found File /Applications/MAMP/htdocs/App/vendor/cakephp/debug_kit/src/Template/Element/sql_log_panel.ctp Line: 24

From my understanding, SqlFormatter class is not found in sql_log_panel.ctp. How can I add/declare the SqlFormatter class?


Solution

Just install it via composer, problem very likely solved then.

  • https://getcomposer.org/doc/00-intro.md
  • http://book.cakephp.org/3.0/en/installation.html#installing-cakephp

I highly recommend you to become familiar with composer, it is a standard tool for php developers for some time now. Composer will automatically install the dependencies for you.

Your second best option would be to download the SqlFormatter package manually from where ever it comes from and set your autoloading or include manually up.



Answered By - floriank
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing