Jump to content

custom error page


Remitur

Recommended Posts

When my server does backup, mysql service is stopped.

So, for few minutes my WHMCS gives a bad

Critical Error
Could not connect to the database.

It lasts just a couple of minutes, and it's deep inthe night... but it's no nice.

A custom page with a message like "We're doing system maintenance, for your security... come back soon" (or something like that) would be much better.

Any idea on how to do it?

 

Link to comment
Share on other sites

20 hours ago, WHMCS ChrisD said:

Hey @Remitur

As far as I am aware this shouldn't be happening, 

It's the backup software which stops mysql service to backup it (it's a simple way to do it, otherwise doing backup of mysql db with mysql running is complicated and require specific backup software)

So that, for few minutes, the systems go down with that error message is OK... I would only to get a better error page for my customer.

 

Link to comment
Share on other sites

On 9/30/2017 at 11:18 PM, Remitur said:

Any idea on how to do it?

I suppose you'd have to try to connect to the database - if it fails, then output your custom message, or redirect to a specific URL.

I wouldn't particularly have it running all the time though (for performance reasons), but just before the backup begins (which I assume is scheduled?).

Link to comment
Share on other sites

On 2/10/2017 at 4:11 PM, brian! said:

I wouldn't particularly have it running all the time though (for performance reasons), but just before the backup begins (which I assume is scheduled?).

Yes, it could be a way... but maybe would be better a more generic solution, which may be useful also if any system errors occurs.
But I have no idea how to manage it... also because (I guess) "Could not connect to the database." is not an Apache error message, but it's internal to WHMCS... right?

Link to comment
Share on other sites

19 minutes ago, Remitur said:

Yes, it could be a way... but maybe would be better a more generic solution, which may be useful also if any system errors occurs.

are you thinking .htaccess redirection?

25 minutes ago, Remitur said:

But I have no idea how to manage it...

nothing's springing to my mind either...

30 minutes ago, Remitur said:

also because (I guess) "Could not connect to the database." is not an Apache error message, but it's internal to WHMCS... right?

yes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated