John,
I guess I don't understand what you want. I am the world's greatest expert on
perl and cgi because I have two weeks of part time experience so you can trust
everything I say ;-).
I clicked on the link you sent for test.pl and I just happen to have that
script which runs fine on my box. I then copied the script to the same
location but with the name test.cgi, and it still runs fine. Here's the
output:
Date: Sat Apr 3 08:50:32 1999
%ENV:
SERVER_SOFTWARE = Apache/1.3.4 (Unix) SuSE/6.0 PHP/3.0.6 mod_perl/1.17
mod_ssl/2.1.7 SSLeay/0.9.0b
GATEWAY_INTERFACE = CGI/1.1
DOCUMENT_ROOT = /usr/local/httpd/htdocs
UNIQUE_ID = NwYcqAoKCgYAAAFWEXA
REMOTE_ADDR = 127.0.0.1
SERVER_PROTOCOL = HTTP/1.0
SERVER_SIGNATURE =
Apache/1.3.4 Server at nariana.arbeitsgruppe.sprintmail.com Port 80
REQUEST_METHOD = GET
QUERY_STRING =
HTTP_USER_AGENT = Mozilla/4.51 [en] (X11; U; Linux 2.2.3 i686)
PATH = /bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
HTTP_CONNECTION = Keep-Alive
REMOTE_PORT = 1169
HTTP_ACCEPT_LANGUAGE = en
SCRIPT_NAME = /cgi-bin/test.cgi
HTTP_ACCEPT_ENCODING = gzip
SCRIPT_FILENAME = /usr/local/httpd/cgi-bin/test.cgi
HTTP_PRAGMA = no-cache
SERVER_NAME = nariana.arbeitsgruppe.sprintmail.com
REQUEST_URI = /cgi-bin/test.cgi
HTTP_ACCEPT_CHARSET = iso-8859-1,*,utf-8
SERVER_PORT = 80
HTTP_HOST = localhost
SERVER_ADMIN = root@localhost
#################################
Is this the script you are working with?
#!/usr/bin/perl
# your httpd.conf should have something like this:
# Alias /perl/ /real/path/to/perl-scripts/
# <Location /perl>
# SetHandler perl-script
# PerlHandler Apache::Registry
# PerlSendHeader On
# Options +ExecCGI
# </Location>
print "Content-type: text/html\n\n";
print "<b>Date: ", scalar localtime, "</b><br>\n";
print "%ENV: <br>\n", map { "$_ = $ENV{$_} <br>\n" } keys %ENV;
###############################################################
I know "works fine here may not be the best answer, but sometimes it helps.
Did you set the permissions on the test.cgi to something like 755?
Steve
John Ericson wrote:
> Hi,
>
> Im trying to run a small CGI script wish is written in perl. It work when I
> write this in netscape: "http://localhost/cgi-bin/test.pl", but if I rename
> it to test.cgi and write: "http://localhost/cgi-bin/test.cgi" in netscape,
> I get an "500 Internal Server Error" message, and my httpd.error_log says:
>
> httpd: [Sat Apr 3 02:30:20 1999] [error] (13)Permission denied: exec of
> /usr/local/httpd/cgi-bin/test.cgi failed
> httpd: [Sat Apr 3 02:30:20 1999] [error] [client 190.64.0.1] Premature end
> of script headers: /usr/local/httpd/cgi-bin/test.cgi
>
> If anyone has any ideas on how to solve this, please mail me.
>
> / John
> UIN: 7325429
> E-MAIL: [EMAIL PROTECTED]
> URL: http:/hem2.passagen.se/highlndr
>
> --
> To get out of this list, please send email to [EMAIL PROTECTED] with
> this text in its body: unsubscribe suse-linux-e
> Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
> archive at http://www.suse.com/Mailinglists/suse-linux-e/index.html
--
http://www.winehq.com | I think.
http://www.suse.com | I think I am.
http://www.kde.org | Therefore I am.
http://samba.anu.edu.au | I think? - Moody Blues
--
To get out of this list, please send email to [EMAIL PROTECTED] with
this text in its body: unsubscribe suse-linux-e
Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
archive at http://www.suse.com/Mailinglists/suse-linux-e/index.html