Jump to content

Recommended Posts

Posted

People who use php on thier sites need to check for core files that need to be deleted. If you want to be emailed when this happens I wrote a simple perl script that will email you on the first 500 error and log any other 500 errors onto a text file.

 

http://byrondallas.heliohost.org/scripts/perl_500_error.txt

 

Upload this file to any directory and call it 500.cgi and chmod 755. This script will create a plain text file in the same directory it is run in called 500_list.txt and log the pages that give you errors.

 

This line goes inside your root .htaccess file:

 

ErrorDocument 500 http://your-site.com/path_to_script/500.cgi

 

This script will email you the first time anybody on your site receives a 500 Error. Any other errors will be logged inside the 500_list.txt

 

To start the script over again (to email you) just delete the 500_list.txt file

 

You need to change the two email addresses to your own email addresses and add your own html.

 

Cheers,

Byron

 

 

 

 

Posted

As of 4/19/2009 people using php need to check your sites again for multiple core files that need to be deleted.

 

If your site seems to get overloaded with huge core files during these down times, you can add this to your root .htaccess file and redirect all php requests to another page like your 500 Error page.

 

RedirectMatch 302 ".php$" http://your_site.heliohost.org/files/500.cgi

 

When things return back to normal, just comment out that line like so

 

# RedirectMatch 302 ".php$" http://your_site.heliohost.org/files/500.cgi

 

It will keep your site from filling up with huge core files.

 

Cheers :)

 

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...