in reply to Request returns "200 OK", reports internal server error. [solved]

Looks like you're using Template::Toolkit... try experimenting with the third parameter to $t->process, e.g. setting it to STDERR - that way you should see what's the result of your template processing and see the server response without any intervening content.

I second the suggestion by perrin, that the "OK" may be source of the problems, I recall having a weird code where use Apache::Constants qw( OK REDIRECT etc. ); worked on one computer and thrown 500 on another, maybe you could try changing it to Apache::Constants::OK()