Jump to content

How to automatically Reload a PHP Page Upon a Fatal Error


flywheeler

Recommended Posts

I have a script that pulls information from my database and does a XML parse to a Google API for information and then places that information back into the database. Randomly, a fatal error will occur that stops the script and the only way to restart the script is to obviously reload or refresh the page. Once the reload occurs, the scipt continues to pull the information from the Google API. It's a little involved to explain why just refreshing the page makes everything back to normal, but you have to trust me on that. Here is the fatal error:

 

Fatal error: Call to a member function getCriterionStats() on a non-object in C:\wamp\www\apility\getDump\get_dump_stats.php on line 177

 

The real issue that I am trying to solve is not make it so that the error doesn't error, rather;

 

HOW CAN I AUTOMATICALLY RELOAD THE PAGE ON A FATAL ERROR??? Again, you have to trust me that when the page is reloaded or refreshed, everything works fine.

 

In general, is there a way that a PHP page can see that some fatal error has occured, and perform some action, like reload the page??

 

Any help would be appreciated.

 

Sincerely,

Flywheeler

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.