[plug] Perl CGI scripts

John Summerfield summer at os2.ami.com.au
Fri Nov 6 01:13:56 WST 1998


On Tue, 3 Nov 1998, P Robinson wrote:

> I'm just venturing into Perl CGI scripts, well CGI scripts in general, and
> am having a few problems.
> 
> To summarize my problems, internet.au had a quick article about CGI in
> their november issue, I tried to replicate thier initial form to get it
> working so I could mess around with it too produce something I could use
> and expand for my own requirements.
> 
> Anyway they didn't really cover everything, so I made the assumption
> that the script should be world executable and reside in the cgi-bin dir
> but it still doesn't work.
> 
> Can someone give me some general pointers to help me start out, and
> possibly an example. Once I get going I'm usually fine, its just the mag
> is stupid and just gives you the two sample files and a general intro to
> CGI which I already knew.

If you want to run these at iinet, better ask them. Useta have to code URLs
as http://www.iinet.net.au/cgi-bin/cgi/user/whatever,,,
the word 'cgi' in this was a program that changed to the user to run.
Unfortunately the cgi program was slightly broken and they wanted to charge
me big bikkies to look into.

I think they change how it's done just before I left, but as I said, ask
what the rules are.


If you're doing it at home, this works:
[summer at emu cgi-bin]$ pwd
//u/database/cgi-bin
[summer at emu cgi-bin]$ ls test
-rwsr-xr-x   1 summer   summer         59 Sep 29 12:03 test
[summer at emu cgi-bin]$ cat test 
#!/bin/bash
cat <<ZZ
Content-Type: text/plain

ZZ
set
cat

[summer at emu cgi-bin]$ 

and here's my (IP-based) virtual host:
[summer at emu conf]$ cat database.Conf 



<VirtualHost database.os2.ami.com.au>
ServerName database.os2.ami.com.au
#NameVirtualHost database.os2.ami.com.au
ServerAlias database
ServerAdmin webmaster at database.os2.ami.com.au
DocumentRoot /u/database
Alias /icons/ /home/httpd/icons/ 
ScriptAlias /cgi-bin/ /u/database/cgi-bin/
ErrorLog /var/log/httpd/database.os2.ami.com.au.error_log
TransferLog /var/log/httpd/database.os2.ami.com.au.access_log
</VirtualHost>

These statements are referenced with an include statement in httpd.conf:
include /etc/httpd/conf/database.Conf

Don't imagine you can access this server.


Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.



More information about the plug mailing list