Discussion Locked

cgi script errors

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i'm having problem with my cgi scripts, when i tried to run it, i got this error:

access to /home/httpd/cgi-bin/cgireport failed IP, reason: Premature end of scr
ipt headers

how could i correct this problem? i've checked already its permissions and i think its okay. could you please help me with this guys, current job status depends on this. tnx.

5 replies

by michael2

The Perl interpreter reads your script first for syntax errors. If it finds some it returns an error. Unfortunately you end up with a server/cgi error instead of the error Perl is trying to communicate to you. If you have all the correct paths and file permissions then it just might come down to old fashioned debugging. Download the DzSoft Perl editor. This approximates a cgi environment. You can develop your scripts on it before going live.

by petronil

Thanks for the comments you've given me it doesn't really solved my problem but it helps me a lot. thanks again.

by joe prochazka

Sounds to me like the script got uploaded as a binary try reuping the file in ASCII mode.

Make sure you manually set ASCII mode in your ftp client. Alot of ftp clients when set to auto detect binary or ASCII treat the .cgi extension as a binary.

This discussion is closed to new replies.