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ā€¦