Re: CGI Problem

From: Robert Binkley (rbinkl@COMCAST.NET)
Date: Tue Dec 02 2003 - 12:18:45 EST


1: Script called env.pl

#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
foreach $item (keys %ENV)
{ print "$item = $ENV{$item}<BR> \n"; }
$rundir=`pwd`;
print "Working Directory is: $rundir<BR>";

STEP 2: Made certain that the line with #!/usr/local/bin/perl (or whatever
your perl is) is the first line with NO LINES above it, or spaces before it.

STEP 3: If your path to perl is different, then edit the first line so it is
correct. Be sure to leave the #!/ beginning alone.

STEP 4: Save the file as env.cgi

STEP 5: Using FTP, transfer the file to what you belive to be your cgi-bin
directory. Make certain that you use ASCII mode, and NOT binary.

STEP 6: Using the Unix Permissions function of your FTP program, set the
permission on env.cgi to 755. This means that the owner can
read-write-execute, group can read-execute and all others can read-execute.

Step 7: Attempt to run the script from your browser. To do this, you must
know how to call a cgi-bin script.
If it runs, you have successfuly installed and executed a cgi script.

Robert Lee Binkley
5009 Silver Oak
Sherwood ark 72120
** rbinkl@comcast.net <mailto:rbinkl@comcast.net>
** ************
** ************

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU]On Behalf Of
Nita Hyde
Sent: Tuesday, December 02, 2003 10:15 AM
To: aix-l@Princeton.EDU
Subject: CGI Problem

We run an apache web browser (1.3.26) but have never accessed CGI
scripts with it. Now one of our users wishes to do so. However, we are
getting forbidden when trying to run the scripts. It is not forbidden
by the directory/file permissions. I can see an index and access the
html files but not the cgi and the permissions are all the same. I
think apache is causing the block because I can execute the cgi from a
unix prompt. Since I know nothing about apache and less about CGI, I
really need help. If I need to change the config file, I'd really like
some input on how to do this. If the problem lies somewhere else,
please clue me in.

TIA, Nita

--
Nita Hyde, Systems Programmer
School Board of Alachua County
620 East University Avenue
Gainesville, Fl. 32601
Phone (352) 955-7500 Ext. 248
Fax   (352) 955-6700


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:23 EDT