Can apache throw a HTTP 500 error whenever a PHP error occurs?

Discussion in 'Apache' started by tin2mon, Oct 22, 2010.

  1. #1
    Hi there,

    im just wondering if you can get apache to throw a 500 internal server error page whenever PHP throws an error? I know how to do this using PHP code at run time, but for a number of reasons i need to be able (somehow) to get apache to throw a 500 internal server error, and then show a custom error page without requiring the run time PHP code.

    Thanks.
     
    tin2mon, Oct 22, 2010 IP
  2. AnoxiA

    AnoxiA Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    HTTP error is HTTP Protocol ERROR!
    but, I think you can user php's:
    header()
    to throw a HTTP error eg
    header('HTTP/1.1 500 Internal Server Error');
    Code (markup):
     
    AnoxiA, Oct 23, 2010 IP