Perl + apache + cgi

[prev] [thread] [next] [Date index for 2004/12/07]

From: Brent Clark
Subject: Perl + apache + cgi
Date: 12:32 on 07 Dec 2004
Hi

Would anyone care to share some info on setting up a CGI.

I keep getting this error:

[Tue Dec  7 09:48:47 2004] [error] [client 192.168.111.214] Premature
end of script headers: /home/gevens/cgi-bin/ecco/scripts/agent/logon.pl

and

[2004-12-07 10:17:28]: info: (target/actual) uid: (gevens/gevens) gid: 
(gevens/gevens) cmd: logon.pl
[2004-12-07 10:17:28]: error: command not in docroot 
(/home/gevens/cgi-bin/ecco/scripts/agent/logon.pl)

Here is the permissions of the file in question:
-rwxr-xr-x  1 gevens gevens   170 Dec  7 12:28 logon.pl

Here is my apache conf:

<VirtualHost ftp>
     DocumentRoot /home/gevens/eccotours
     ScriptAlias /cgi-bin/ /home/gevens/cgi-bin/
     AccessFileName a.htaccess
     User gevens
     Group gevens
     ErrorLog /var/log/apache/ecco.log
     CustomLog /var/log/apache/ecco-access.log common
</VirtualHost>

I thought there was something wrong with my script, but this script runs
on my hosted box in the uk, with no problems.
All I did was scp across locally.

I editted the logon.pl script and just made it:

#!/usr/bin/perl -w
#
print "Content-type: text/html\n\n";
#use CGI::Pretty qw();
#use CGI::Carp qw(fatalsToBrowser);
#use strict;
#use warnings;

print "HELLO WORLD";

and still nothing.

I wonder if it does not have anything todo with suEXEC.

[2004-12-07 13:36:14]: info: (target/actual) uid: (gevens/gevens) gid: 
(gevens/gevens) cmd: logon.pl
[2004-12-07 13:36:14]: error: command not in docroot 
(/home/gevens/cgi-bin/ecco/scripts/agent/logon.pl)

Any assistants would be greatly appreciated.

Kind Regards
Brent Clark


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Perl + apache + cgi
Brent Clark 12:32 on 07 Dec 2004

Re: Perl + apache + cgi
Tom Schindl 12:42 on 07 Dec 2004

Re: Perl + apache + cgi
Brent Clark 12:48 on 07 Dec 2004

Re: Perl + apache + cgi
Arnaud Blancher 12:46 on 07 Dec 2004

Re: Perl + apache + cgi
Brent Clark 12:54 on 07 Dec 2004

Re: Perl + apache + cgi
Tom Schindl 13:31 on 07 Dec 2004

Re: Perl + apache + cgi
Brent Clark 13:35 on 07 Dec 2004

Re: Perl + apache + cgi
Tom Schindl 14:18 on 07 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52