I'm getting a 500 error when trying to visit my page. Was able to track it down to this error in the logs, but can't seem to get it fixed. Updated the craft/app folder with the latest Craft version, but still no luck.

From my phperrors.log

[14-Mar-2017 17:56:34 UTC] PHP Fatal error:  Uncaught Error: Class 'Craft\DbConnection' not found in /var/www/site/craft/app/etc/behaviors/AppBehavior.php:849
  • Does craft/app/etc/db/DbConnection.php exist on the file system?
    – Brad Bell
    Mar 14, 2017 at 20:12
  • @BradBell Nope, just noticed that. Should that come with Craft or does it require additional manual setup?
    – hidace
    Mar 14, 2017 at 20:35
  • @BradBell Yeah, just realized that directory is not getting pushed up with the others for some reason. It's on my machine locally (not being gitignored). Not sure what the issue is.
    – hidace
    Mar 14, 2017 at 20:51
  • 1
    I'd have guessed gitignore, but maybe whatever deployment services you're using has their own blacklist mechanism.
    – Brad Bell
    Mar 14, 2017 at 20:54
  • @BradBell Thanks Brad. It actually was a db in the gitignore. It was meant to hide a db directory in the project root, but also ended up hiding the db folder that I needed. This solved this class error. Appreciate it.
    – hidace
    Mar 14, 2017 at 21:34

1 Answer 1


This project was missing the craft/app/etc/db/directory and all files within that directory (my .gitignore file had meant to ignore the project root db directory, but caught all directories named 'db'). Removing 'db' from my .gitignore and re-pushing to my server solved this error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.