Perl Download Script



I have a routine download script on a site that was rearranged over the weekend and now it is returning a internal error when executed. Although the script path has changed the paths being referrenced have not…

My perl skills are very basic but I am at a total loss here on how to debug a perl script that just returns a internal error with no other debug information…

Basically how can I get a perl script to return a line number that the internal error is failing on??


Does it fail from the command line as well? Is there anything interesting in the error log for the domain?


Sadly just an internal error, nothing else which is why it is soooo frustrating… It is impossible to debug like this…


Have you checked running the script via the command line, running perl -c on it, etc., and that all works fine? Have you chceked the error log for the domain?

If you’re talking about a “500 Internal Server Error” type error, you’d only see that from a web browser.


not tried perl -c to see if that works… I will give that a go now… :slight_smile:

domain logs and web logs just return a internal error no other information…


Syntax is also ok :frowning:

[Mon Aug 23 09:23:03 2004] [error] [client] Premature end of script headers: /home/xx/xxxxxxxx/moviedownload.cgi


“Premature end of script headers” is generally a problem with permissions or ownership, especially if the script runs fine from the command line.

If you’ve doublechecked all that, let me know the user and / or domain we’re talking about here.


I have sent you an email to the email address listed on your website (@HQ.dream…)

With the URL information… It has seriously got me beat the CGI is a simple little thing…


Try putting this in the script to see error messages from perl in the browser:

:cool: Perl / MySQL / HTML+CSS


Hey thanks for that… Will found the problem for me but I will tuck that away for future information…