Jump to content

PHP Down Again


Byron

Recommended Posts

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

 

 

 

 

Link to comment
Share on other sites

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 :)

 

 

 

 

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