View Full Version : having trouble with - cgi-bin/*.pl
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.
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:
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...
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.
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!
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 email@example.com and I'll see if I can help.
11-22-1998, 07:21 PM
Thank you Del!!!
I was going to reply with *exactly* the same recommendation...
11-24-1998, 07:38 PM
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
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.