Page 1 of 1

Turn off, but log Smarty and PHP errors

Posted: Sat Jun 04, 2011 9:20 pm
by replytomk3
Hello all. I am searching the forum on how to disable all Smarty and PHP error notification on the frontend of the website, and not finding anything.

.htaccess setting
php_flag display_errors 0

brings website down.

config.php setting
error_reporting(E_ALL ^ E_NOTICE);

has been added, but a PHP error is still displayed
"Warning: filemtime() [function.filemtime]: stat failed for..."

Is that the correct setting for config.php to disable PHP error display?

I would like to know how to disable all Smarty error reporting on my website. Being able to log Smarty and/or PHP errors would be a big bonus.

Re: Turn off, but log Smarty and PHP errors

Posted: Sat Jun 04, 2011 9:54 pm
by replytomk3
Errors I get is when content was copy-pasted from word with no-no things like page margins in the pasted code, etc.

Once I remove those from my source code, error goes away. But it is unprofessional for my site visitors to see ANY errors.

Text that I copy-pasted into TinyMCE might have contained things like {assign}. CMSMS tries to evaluate that and shows a Smarty error on the front end. I do not want an error to be shown.

Re: Turn off, but log Smarty and PHP errors

Posted: Sun Jun 05, 2011 5:32 pm
by Dr.CSS
Don't paste from word or use the word paste box...

Re: Turn off, but log Smarty and PHP errors

Posted: Sun Jun 05, 2011 6:59 pm
by replytomk3
At this point, I do not know which, if any, of my pages generate Smarty errors. I cannot go thru every single page because there are 400+ and the error is only shown once per page (it may no longer be shown for me).

I also think that it is unprofessional for my site visitors to see PHP or Smarty errors.

I cannot disable display of PHP errors in the .htaccess file.

I do not know how to turn off Smarty errors display.

Re: Turn off, but log Smarty and PHP errors

Posted: Thu Jun 16, 2011 9:18 pm
by replytomk3
Anyone who knows?