The problem is how you are running the CGI. You've configured Apache,
but you aren't using Apache to serve up the file...you're just opening
the file.
Instead of file:/..., try http://localhost/cgi-bin/filename.cgi
To run a CGI program from the command line: just do it. It's a program
and it prints on stdout. If it takes parameters you have a different
story. You may be able to feed the params via stdin using echo or
typing them in directly.
Ken Dalton wrote:
>
> I am running Redhat Linux 6.0 with the latest version of apache.
> All the config files are now in 1 file which is where I put the AddHandler
> line.
>
> How do I run cgi from the command line ?
>
> In netscape I type file:/home/httpd/cgi-bin/filename.cgi and thats when the
> code comes up instead of the cgi running.
>
> Ken
>
> At 04:36 PM 6/19/99 -0700, you wrote:
> >What version of apache are you running? Recent versions changed the
> >conventions to consolidate all the config files into one -- are you putting
> >the AddHandler line in the right file?
> >
> >Is your cgi program executable? Can you run it from the command line?
> >
> >Did you set your apache configuration to make cgi programs executable from
> >the directory they are in?
> >
> >At 03:58 PM 6/19/99 -0700, you wrote:
> >>Can someone help me out with this cgi problem ??
> >>From root ,netscape is just showing me the cgi code and its not executing
> it.
> >>I have AddHandler cgi-script .cgi enabled..
> >
> >------------------------------------"Never tell me the odds!"---
> >Ray Olszewski -- Han Solo
> >Palo Alto, CA 94303-3603 [EMAIL PROTECTED]
> >----------------------------------------------------------------
> >
--
My public encryption key is available from
www.az.com/~drysdam/crypt/rysdam.gpg.html
and of course www.keyserver.net