PDA

View Full Version : having trouble with - cgi-bin/*.pl


SJMorris
11-21-1998, 03:48 PM
I'm having trouble with my cgi-bin/board.pl script. If I run it manually "perl board.pl" it seems to producing the right output. However, from the web page, I get a "Premature end of script headers" error. All I was really wondering was where to look for the error logs, to see if I could get a more helpful error.

Thanks,
Steven

Terra
11-21-1998, 07:01 PM
Ahhh, Nothing like already having this in a FAQ... http://www.aota.net/ubb//smile.gif You may reference it at the following address:
http://www.aota.net/ubb//Forum11/HTML/000003.html

In short: I just checked your CGI files and they are set mode 775, which Apache suEXEC mechanism will instantly decline executing them...

Also: We have *very* detailed CGI logs for programmers... You may view the script log in the "logs_cgi" directory... Unfortunately the 775 error above is not shown in any of your logs except for the "Premature" failure...

Hope this helps...

--
Terra

SJMorris
11-22-1998, 12:29 AM
Thanks, Terra. I knew the files had to be executable, but I didn't realize it had to be 755. Its all fixed now.

- Steven

the600club
11-22-1998, 05:56 PM
I am Having the same problem with the /cgi-bin/*.pl and the .pl file is chmoded 755. I am getting the premature message from the server... Help!

Del
11-22-1998, 07:00 PM
You can log in via telnet, and change to the cgi-bin dir. Then, type 'perl -cw scriptname.pl' (no single quotes), and Perl will tell you what the bug is. Chances are there's a misplaced semicolon, or unescaped character somewhere. If that doesn't tell you anything, feel free to email me at del@downinit.com and I'll see if I can help.

Del

Terra
11-22-1998, 07:21 PM
Thank you Del!!!

I was going to reply with *exactly* the same recommendation...

--
Terra

Del
11-23-1998, 02:36 AM
Anytime http://www.aota.net/ubb//smile.gif

meikel
11-24-1998, 07:38 PM
Hi,
usually when I get this ****ed "Premature end of script headers" error, this is to be taken by word. I usually forget to add a
print "\n" after writing a http-header.
Most times, I do this by just one line
print "Content-type: text/html\n\n";
Later I added some more stuff to the header and I constantly tend to forget one of these \n.
Maybe this is the same for you???

Greetings from Bonn, Germany
Meikel Weber
http://www.meikel.com