[pmwiki-users] Custom error page for 500 error

Joachim Durchholz jo at durchholz.org
Sun Jun 12 15:27:08 CDT 2005


Ying Zhao wrote:
> Once in while, I got Internal server error while browsing/editing my
>  pmwiki site. Does anyone know the potential cause of such error?

It might be that the machine is so slow that PmWiki hits the execution
time limit of PHP (which is typically configured at 30 seconds).

To be sure, you should take a look at the error log. (Your provider
should give you access to it, or provide a relevant excerpt on request.
If he doesn't, choose a different provider - without the error log
you're pretty much reduced to guesswork, and that's immensely
time-consumig.)

> What ratio is considered tolerable?

That depends entirely on the views of those visiting your site, so
there's no generally valid answer.

For me, if it's rare enough that I unthinkingly click Reload, I consider
it tolerable. Anything above that threshold makes me investigate. (In
practice, that makes the threshold very low: server failures are so rare
that every single one sticks out like a sore thumb. However, I'd
investigate less if Internal Server Errors were a common occurrence.)

> Beside, I want to create a custom error page for this error. I have
> created a error.html and placed it underneathe Apache's DocumentRoot.
> Then I added line, DocumentError 500 /error.html, into both the
> .htaccess in the same directory and the .htaccess within the pmwiki
> install's local directory.

.htaccess in the PmWiki directory should be enough.

It may be that the Apache configuration doesn't have FileInfo in the
AllowOverride directive for your account. A sign of that is a consistent
Internal Server Error whenever you try to view a file from the affected
directories. Again, looking into the error log would help - Apache
usually logs such problems.

> I do not see this custom error page has taken into any action. Can
> anyone let me know if I am doing something incorrect?

Unless we can take a closer look at the concrete .htaccess and any error
messages: No.
:-)

Regards,
Jo




More information about the pmwiki-users mailing list