This topic is locked

Disable php errors in production

2/7/2016 3:39:47 PM
PHPRunner General questions
S
Stucco author

Hi - there is a line @ini_set("display_errors","1"); at the top of each generated page.
This causes PHP errors to be displayed to the end user.
I need these errors to be logged to the stderr log, instead of being shown to the user. The appropriate value of display_errors for this action is 'stderr'. http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors
How can I set this as a project-wide setting since the individual file setting overrides my php.ini?
Thanks!

Sergey Kornilov admin 2/9/2016

You can try adding something like this to AfterAppInit event:

@ini_set("display_errors","0");