in reply to 'Premature end of script' errors running script as CGI
That usually shows the error, because it's usually something simple (a mispelled variable or something).
Try doing the same.