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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.