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.