0

I read about a lot of ideas about how to test the ErrorDocument 500 directive, but they don't work. If I put bad php code, I still get a page with my php error in it. If I create a bad htaccess file, I get the following error and not my custom error :

[an error occurred while processing this directive] The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. [an error occurred while processing this directive]

I need to raise this custom error page to ensure that it works even though most applications will manage their own 500 pages. Thanks

1

1 Answer 1

0

PHP errors aren't 500 errors. Apache is fine. PHP has encountered the error. This can be hidden in PHP.ini, but it results in a "white screen of death" instead.

On to the .htaccess problem. The .htaccess file controls the custom error pages for your site. If Apache cannot parse the custom error pages in this file it means there are no custom error pages set to display.

Sign up to request clarification or add additional context in comments.

1 Comment

I put my custom errors in the httpd.conf file. The htaccess is just to force an error from the server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.