I know how to make custom error pages - that's not my question.
The problem is this... how do you specifically make a custom 500 Internal Server Error page, and get it to successfully display if the server has an error?
i.e. How can you display a nice error page from the system when the system isn't working?
I am using a PHP MVC framework, but obviously if there's a server error, the framework can't be started and the error page is inaccessible. So how do you then show that error page?
I assume it involves using a static HTML page for just that one error, that bypasses any of the PHP framework or something. However, that then means I am sacrificing the integrity of the framework itself by hard coding paths (e.g. to images), and duplicating code (e.g. Common CSS used to make my pages look uniform).
Because of the paradox you discovered, it is not usually done -- at least not by deep thinkers...
Use a dead-simple static-HTML custom 500-Error page, or no custom 500-Error page at all. If your back-end is down and a visitor sees a 500-Error, you have far bigger problems than "the error page isn't styled like other pages..."