Preventing errors on site

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 15, 2016   (RSS)

By pault - February 10, 2016

I'm trying to prevent MySQL errors from being displayed on a production site when using list viewers.

If I have an incorrectly formed SELECT statement for example then the site displays a blank page with an error message along the lines of the following:

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '") ORDER BY dragSortOrder' at line 3

I've tried turning on the setting 'Hide all PHP errors and warnings' but this doesn't prevent the error from displaying.

If I try and edit cmsb/lib/init.php to change error_reporting(-1) to be error_reporting(0) then i get another error about the error log.

Essentially, I never want a website visitor to see one of these errors, can you suggest anything?

Thanks!

By gregThomas - February 11, 2016

Hi Pault,

What functions / code are you using to make the MySQL call?

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - February 15, 2016

Hi Paul,

Good to hear the issue is resolved, let me know if there is anything else I can help with.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com