Help on CGI scripts please!

Help on CGI scripts please!

Post by David Vaugha » Mon, 09 Jun 1997 04:00:00



I am familiar with unix shell scripts and would like to get started with
CGI by using some very simple scripts that just cat information to the
screen or into a file on the server. I can make the shell script on the
server, I can make an HTML file that refers to it using the <img src="">
syntax, but I am not sure what, if anything, happens next. The HTML
seems to not recognise my script as an executable, (even though it has
execute permission), but uses it as a text file.

Can anyone enlighten me further?

Thanks

Dave

 
 
 

Help on CGI scripts please!

Post by Robert Seege » Tue, 10 Jun 1997 04:00:00


David,

In general, you want to put cgi-bin scripts in the directory that your
web server recognizes as it's cgi-bin directory. In general, this means
that you must ask you sys admin what directory this is. If you run your
own system, read the documentation/man pages for you web server, and
find out how to set this up.

Aside from this, I'm told their is a way to set up certain files in your
normal html directory to be executed, rather than read as text files.
Unfortunately, I don't know how it is done. If you happen to find out, I
would be interested in this information.

                        Hope this helps,
                        Robert Seeger


> I am familiar with unix shell scripts and would like to get started with
> CGI by using some very simple scripts that just cat information to the
> screen or into a file on the server. I can make the shell script on the
> server, I can make an HTML file that refers to it using the <img src="">
> syntax, but I am not sure what, if anything, happens next. The HTML
> seems to not recognise my script as an executable, (even though it has
> execute permission), but uses it as a text file.

> Can anyone enlighten me further?

> Thanks

> Dave


 
 
 

Help on CGI scripts please!

Post by STOCK Frédéri » Wed, 11 Jun 1997 04:00:00



> > I am familiar with unix shell scripts and would like to get started with
> > CGI by using some very simple scripts that just cat information to the
> > screen or into a file on the server. I can make the shell script on the
> > server, I can make an HTML file that refers to it using the <img src="">
> > syntax, but I am not sure what, if anything, happens next. The HTML
> > seems to not recognise my script as an executable, (even though it has
> > execute permission), but uses it as a text file.

> > Can anyone enlighten me further?

> > Thanks

> > Dave

Hello,
generally, the web server waits cgi scripts in cgi-bin dir.
in the srm.conf file add :

ScriptAlias /cgi-bin/   /your/path/to/real/cgi-bin/dir/

the if you type "http://your_host/cgi-bin/your_script
it will run /your/path/to/real/cgi-bin/dir/your_script

if you want to execute all the files (anywhere) with .cgi extension,
add the line:

AddHandler cgi-script .cgi

Bye.
Frederic STOCK

 
 
 

Help on CGI scripts please!

Post by Mason Wrigh » Wed, 11 Jun 1997 04:00:00




> > > I am familiar with unix shell scripts and would like to get started with
> > > CGI by using some very simple scripts that just cat information to the
> > > screen or into a file on the server. I can make the shell script on the
> > > server, I can make an HTML file that refers to it using the <img src="">
> > > syntax, but I am not sure what, if anything, happens next. The HTML
> > > seems to not recognise my script as an executable, (even though it has
> > > execute permission), but uses it as a text file.

> > > Can anyone enlighten me further?

> > > Thanks

> > > Dave

> Hello,
> generally, the web server waits cgi scripts in cgi-bin dir.
> in the srm.conf file add :

> ScriptAlias /cgi-bin/   /your/path/to/real/cgi-bin/dir/

> the if you type "http://your_host/cgi-bin/your_script
> it will run /your/path/to/real/cgi-bin/dir/your_script

> if you want to execute all the files (anywhere) with .cgi extension,
> add the line:

> AddHandler cgi-script .cgi

> Bye.
> Frederic STOCK

Careful... There are security risks with this later example.

Have Fun,

Mason

 
 
 

Help on CGI scripts please!

Post by Mahmut Kurs » Mon, 16 Jun 1997 04:00:00


 > I am familiar with unix shell scripts and would like to get started with
 > CGI by using some very simple scripts that just cat information to the

buy the Linux Journal. They show simple CGI Scripts almost in any
issue.

 
 
 

1. PLEASE HELP: CGI scripts permission denied

    We just installed Apache 1.3 and each time you submit a form which
is a cgi script  the browers returns a permission denied error.

Can anyone advise?
Do you think I have forgotten an entry in the httpd.conf file or do you
think the deamon is running with the
wrong permission?

Please respond to my e-mail address as I won't have time to read this
posting.

Thank you

2. Help with Redhat 6.1 Install

3. CGI - question about 'nph-' script - Please help!

4. Help Linux & Term

5. Help: Apache: cgi script - malformed header from script

6. Where can i find a program for printing on terminalservers ?

7. Please. Second Request, GCC and CGI Scripts.

8. NETRC macro not xferring occasional file

9. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

10. announce: cgi++ v2.0: a c++ library for cgi script handling

11. Perl CGI script gets CGI params as ARGV arguments under Apache2

12. shell cgi script and mod_perl cgi

13. apache: give /home/mailman/cgi-bin permissions to run cgi-scripts.