cloudrck Posted May 17, 2016 Report Share Posted May 17, 2016 How do you disable error displays (not logging). There shouldn't be stack traces on pages in a production environment. For example, when there is no database connection, it displays a full trace even though /config/blesta.php has the default: Configure::errorReporting(0); Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted May 17, 2016 Report Share Posted May 17, 2016 The stack trace comes from the framework. Change /app/config/core.php Configure::set("System.debug", true); to Configure::set("System.debug", false); to remove the stack trace. The error page ("Something went wrong") will still be displayed, and is configured with Configure::set("System.error_view", "errors"); Michael and activa 2 Quote Link to comment Share on other sites More sharing options...
0 Michael Posted May 17, 2016 Report Share Posted May 17, 2016 That's default not sure why myself but there's a feature request here: Errorreporting(-1) Active Only If Admin Is Logged to improve error reporting maybe you could add to that. Quote Link to comment Share on other sites More sharing options...
0 cloudrck Posted May 17, 2016 Author Report Share Posted May 17, 2016 Okay, this seems like something that should be disabled by default. For: Configure::set("System.error_view", "errors"); What should that be set to to disable the error page? I don't see any of this documented Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted May 17, 2016 Report Share Posted May 17, 2016 What should that be set to to disable the error page? I don't see any of this documented What is your expectation? A blank white page? The setting refers to the directory name within /app/views/ that contains the error templates. It's currently using /app/views/errors/*. Any documentation would be apart of the framework's documentation for minPHP. I'm not sure where Cody has placed that or if it is available. Michael 1 Quote Link to comment Share on other sites More sharing options...
0 cloudrck Posted May 18, 2016 Author Report Share Posted May 18, 2016 Ok, actually, that's fine as is. Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted May 18, 2016 Report Share Posted May 18, 2016 I prefer to allow only staff to see irrors . That way you can see if your system has a issue . activa 1 Quote Link to comment Share on other sites More sharing options...
0 Michael Posted May 18, 2016 Report Share Posted May 18, 2016 I prefer to allow only staff to see irrors . That way you can see if your system has a issue . The only issue here is how can we tell if we can't login because the error prevents us logging in? Quote Link to comment Share on other sites More sharing options...
0 activa Posted May 18, 2016 Report Share Posted May 18, 2016 The only issue here is how can we tell if we can't login because the error prevents us logging in? maybe something like Configure::set("System.error_reporting.display", true); // enable/disable display error reporting Configure::set("System.error_reporting.admins_only", false); // true : display error reporting for admins only, false : display for all Michael and Blesta Addons 2 Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted May 18, 2016 Report Share Posted May 18, 2016 maybe something like Configure::set("System.error_reporting.display", true); // enable/disable display error reporting Configure::set("System.error_reporting.admins_only", false); // true : display error reporting for admins only, false : display for all well tough . Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted May 18, 2016 Report Share Posted May 18, 2016 maybe something like Configure::set("System.error_reporting.display", true); // enable/disable display error reporting Configure::set("System.error_reporting.admins_only", false); // true : display error reporting for admins only, false : display for all As I mentioned above, the framework core generates the stack trace. This is evaluated before any code for the application (i.e. Blesta) gets executed, and often as a result of the application throwing an exception or a misconfiguration raising an error. Setting a configuration value in the core for whether to display errors to admins would require the core to be dependent on the application when the application is dependent on the core. This is a circular dependency design anti-pattern that wouldn't make sense to introduce. If you're concerned about some users seeing a stack trace, then I would recommend disabling them as I described above. If you happen upon such an error, check the php error logs for more information. Quote Link to comment Share on other sites More sharing options...
Question
cloudrck
How do you disable error displays (not logging). There shouldn't be stack traces on pages in a production environment.
For example, when there is no database connection, it displays a full trace even though /config/blesta.php has the default:
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.