You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gary Manigault <ma...@dunncenter.org> on 2004/12/10 21:31:49 UTC
[users@httpd] CGI questions
I am having a hell of a time with my CGI scripts. Here is what I have.
I have read everything I can find on
Error message:
Premature end of script headers: classifieds.cgi
I have run the perl -c on script and it passed. I checked the location
of perl # !/usr/bin/perl. Probably everything else you can think of
right off the bat. I even setup the following simple script to test
with.
#!/usr/bin/perl
#===============================
# Testing CGI script installation
# Copyright 1999-2001, Emmie P. Lewis
# Created 07/24/99
#===============================
# This script is designed to test
# CGI script installation
#===============================
print "Content-type: text/plain\n\n";
print "Yippee! It works!";
I have run the above script from the command prompt using the root
userid and pw and it ran. I have not been able to get it to work from
the browser.
This script will not even work. In all the reading I have been doing
today I came across something that I think might be in the right
direction. Could it be that the userid and group used to run Apache is
not at a high enough level to run any cgi scripts. That is a thought.
If you have any other suggestions by all means please let me know.
Thanks.
Gary Manigault
Sr. Systems Analyst
765.983.8146
Re: [users@httpd] CGI questions
Posted by Patrick Cossette <pc...@aei.ca>.
Anything in the Apache error log? It's probably a permissions porblem. Is
CGI enabled in that directory? You need to enable, in httpd.conf for instance.
Bye.
At (15:31) 10-12-2004, you wrote:
>I am having a hell of a time with my CGI scripts. Here is what I have. I
>have read everything I can find on
>
>Error message:
>Premature end of script headers: classifieds.cgi
>
>I have run the perl -c on script and it passed. I checked the location of
>perl # !/usr/bin/perl. Probably everything else you can think of right
>off the bat. I even setup the following simple script to test with.
>
>#!/usr/bin/perl
>#===============================
># Testing CGI script installation
># Copyright 1999-2001, Emmie P. Lewis
># Created 07/24/99
>#===============================
># This script is designed to test
># CGI script installation
>#===============================
>
>print "Content-type: text/plain\n\n";
>print "Yippee! It works!";
>
>I have run the above script from the command prompt using the root userid
>and pw and it ran. I have not been able to get it to work from the browser.
>
>This script will not even work. In all the reading I have been doing
>today I came across something that I think might be in the right
>direction. Could it be that the userid and group used to run Apache is
>not at a high enough level to run any cgi scripts. That is a thought. If
>you have any other suggestions by all means please let me know. Thanks.
>
>Gary Manigault
>Sr. Systems Analyst
>765.983.8146
>
Re: [users@httpd] CGI questions
Posted by Joshua Slive <js...@gmail.com>.
On Fri, 10 Dec 2004 15:31:49 -0500, Gary Manigault
<ma...@dunncenter.org> wrote:
> I have run the above script from the command prompt using the root userid
> and pw and it ran. I have not been able to get it to work from the browser.
You ran it by doing
./classifieds.cgi
right?
If you call "perl classifieds.cgi" then you aren't testing correctly.
Assuming your test was correct, the next thing to check is whether or
not you are using suexec. See:
http://httpd.apache.org/docs-2.0/howto/cgi.html#troubleshoot
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org