Operating Systems > Linux and UNIX

Apache and CGI

<< < (2/5) > >>

Master of Reality:
this was in the error log for apache:
[Error} (2) No such file or directory: exec of var/www/html/bobhub/cgi-bin/yabb/YaBB.cgi failed
[client ***.***.***.***] Premature end of script headers: /var/www/html/bobhub/cgi-bin/yabb/YaBB.cgi

it gives me the same thing with the perl_test.cgi that comes with ikonboard.

[ July 21, 2002: Message edited by: Master of Reality / Bob ]

voidmain:
That actually means that it is executing the CGI program which is good. If it was not executing the CGI program it would display the source code instead, just like any other text file.  Can you execute the script on the command line and have it run with no errors?  If it runs with no errors on the command line but gives you a message about premature end of headers when you execute it through Apache it usually can be resolved by looking at the first couple of lines of the script (print statements).  You may have to put this line as the first output line:

print "Content-Type: text/html\n\n";

Also, in your error message you have "cgi-nin" as part of the directory path.  Is that a typo?

[ July 18, 2002: Message edited by: VoidMain ]

Master of Reality:
first of all, i guess it would help to make it executable.
It still did the same thing.
I put that print statement: print "Content-Type: text/html\n\n";
and it still did the same thing

voidmain:
Did you run the script on the command line as I suggested to make sure there isn't a problem with the script itself?

TheLizardKing:
I can't be much of assistance in this field but are you trying to use the perl that came with your distro?  because you may be interested in mod_perl

http://perl.apache.org

I can't help much with the installation but they do have good documentation and its much faster then using perl outside of apache.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version