MyBB Community Forums

Full Version: How to avoid displaying database related error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a long script to execute and sometime maximum script execution time limit reached right at the moment of "Update query" which cause a detailed error revealing complete sql query, I want to avoid it , I don't want that system displays detailed error How can I avoid this???


[attachment=31987]
Not much you can do here, however if this script is running regularly I would seriously consider a rewrite of the script to stop you from running into this issue.

What are you doing with it exactly?

Whatever it is it is actually killing mysql or blocking your connection to it
(2014-07-19, 02:30 PM)Dannymh Wrote: [ -> ]Not much you can do here, however if this script is running regularly I would seriously consider a rewrite of the script to stop you from running into this issue.

What are you doing with it exactly?

Whatever it is it is actually killing mysql or blocking your connection to it

Nothing is overkilling mysql, My script has to download message images and finally update moderator log and if there are a lot of images then script execution limit can easily be reached Many host like 000webhost only allow 10 seconds of window
You can catch these before they fail.

That is your only real option to try and trap the errors before they display, you could alway check the size or amount of images first and stop the script at xKB OR x image and then reload the script. The same way the recount tasks work.

Other than that you could run this from a task or a cron and that way stop front end users from ever seeing them.

It's about mitigation and preventing errors rather than anything else.

The other method is to use the error hook of the page output hooks and alter the output if an error with db info is found
I believe this actually can be turned off.

ACP->Config->Server & Optimization Settings. Look for Error Type Medium. Set that to Hide Errors & Warnings.