Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9312833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:43:44+00:00 2026-06-19T01:43:44+00:00

I have tried everything I can think of to stop errors from displaying in

  • 0

I have tried everything I can think of to stop errors from displaying in CakePHP. I have checked the CakePHP instruction manual and have searched the internet and stackoverflow for phrases like “turn off error reporting in CakePHP” and “turn off debug mode in CakePHP”. Here’s a description of the errors that are still displaying and what I have tried to hide these errors in CakePHP:

Errors I’m Still Getting

  • Error One: I intentionally declared a variable incorrectly in one of
    my Controller classes to test whether errors were displaying, and received
    “Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in
    (file paths and line number)”

  • Error Two: I tried typing a bunch of gibberish into the URL as a
    test to see if it would display an error. I get a “Missing
    Controller” error from Cake.

Things I’ve Tried to Stop Errors from Displaying

  • Configure::write(‘debug’, 0); (edited to zero) in \app\Core.php

  • error_reporting(0); (added the line) in \app\Config\bootstrap.php

  • Configure::write has a ‘level’ key in an array in \app\Core.php so I changed it from “E_ALL & E_DEPRECATED” to 0. Then I tried blanking it out.

  • Added a php.ini file to public_html which contained a whole pile of commands to turn off errors. I also deleted this file to make sure it had not been there all along interfering.

  • Commented out sections of ___construct() in \lib\Cake\Utility\Debugger.php (this removed error messages out of the title tags of the page that shows up when gibberish is typed into the url but not the missing controller error). By the way, error messages were being put into the HTML titles. That’s weird.

  • Commented out echo $self->outputError($data); in showError in \lib\Cake\Utility\Debugger.php

  • Double checked the manual’s “Deployment” page, which referred me to the “Debug” page. That page talked about setting “Configure::debug”, which is written slightly differently from “Configure::write(‘debug’, 0);” so I tried variations.

  • I searched all directories containing php for the phrases “error_reporting(” and “ini_set(” to ensure I hadn’t enabled errors somewhere in there and forgotten.

If anyone has any idea why these are still displaying despite all that I’ve tried or what can be done to turn them off, I would appreciate it very much.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:43:46+00:00Added an answer on June 19, 2026 at 1:43 am

    I tried Mark’s suggestion, which worked. When I searched my entire Cake installation for “Configure::write(‘debug'”, I found tons of lines to turn debugging on – although most of these were present in the original files as downloaded from the official CakePHP site. As an experiment, I made a copy of my Cake installation, changed all instances that set debug higher than 0, and that worked. Then, assuming that some of them should be there, and not being sure which were supposed to be there, I decided to completely delete CakePHP, download a fresh copy, and replace it.

    After I configured the new core.php, the missing controller error was replaced with a not found error, and the parse error that I intentionally caused for testing purposes was replaced with an internal server error. I’m not sure that showing an internal server error is what it is supposed to do… but the behavior did change after editing the debug setting, and it doesn’t reveal the file paths anymore. So, I guess that it’s behaving the way that it’s supposed to.

    I would like to give Mark credit for helping me solve this, but he only posted a comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried everything I can think of...going from my localhost to another servers
Having an issue here that I have tried everything I can think of but
I have this code and I have tried everything i can think of to
I have tried everything I can think of and every code sample imaginable but
I have tried everything I can think of in css in order to get
I have tried everything I can think of to fix this, but I can't
I have tried about everything I can think of but I can't seem to
I have researched and tried everything that I can think of to try and
I have tried everything I can think of to get this to work, to
I have tried everything I can think of to get this event to trigger

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.