From a-doug@microsoft.com  Sat Oct  7 00:26:10 2000
Received: from mail5.microsoft.com (mail5.microsoft.com [131.107.3.121])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id AAA26587
	for <prolog@swi.psy.uva.nl>; Sat, 7 Oct 2000 00:26:09 +0200 (MET DST)
Received: from 157.54.9.108 by mail5.microsoft.com (InterScan E-Mail VirusWall NT); Fri, 06 Oct 2000 15:26:15 -0700 (Pacific Daylight Time)
Received: by INET-IMC-05 with Internet Mail Service (5.5.2651.58)
	id <4L19YRKW>; Fri, 6 Oct 2000 15:26:14 -0700
Message-ID: <56791EC22E349D428D0C05C89EAB8A24AEAE99@red-msg-05.redmond.corp.microsoft.com>
From: "Douglas Miles (Volt Computer)" <a-doug@microsoft.com>
To: "'Oliver'" <a9503280@unet.univie.ac.at>,
        "'Prolog'"
	 <prolog@swi.psy.uva.nl>
Subject: RE: Executable File
Date: Fri, 6 Oct 2000 15:26:00 -0700 
X-Mailer: Internet Mail Service (5.5.2651.58)

open up vim or pico (you choose the editor)

place these 2 lines in it:

#!/bin/sh
exec /usr/local/bin/pl -f none -g
"load_files(['yourprologfile.pl'],[silent(true)])" -t main -- $*

save it out as test.cgi

make sure it is in a executable directory and appache is configured to know
this is an executeable dir
so maybe an already existing cgi-bin

msl# chmod 755 test.cgi

to make sure the .cgi file is executable

then at the prompt... 

./test.cgi

see if it executes.. it must do it at the cmdline.. otherwise it wont under
appache

this should work now on the webserver

if not, see if this works...

#!/bin/sh
echo "Content-type: text/html"
echo "<HTML>"
echo "Hello World"
echo "</HTML>"



-Douglas


> -----Original Message-----
> From: Douglas Miles (Volt Computer) 
> Sent: Friday, October 06, 2000 3:17 PM
> To: 'Oliver'; Prolog
> Subject: RE: Executable File
> 
> 
> 
> Oliver,
> 
> 
> put this in a CGI file ....
> 
> #!/bin/sh
> exec /usr/local/bin/pl -f none -g 
> "load_files(['myprologfile.pl'],[silent(true)])" -t main -- $*
> #------------Done----------
> 
> 
> see  
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/Manual/sec-2.10.
> html#sec:2.10.2.1 for example
> 
> and 
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/Manual/sec-2.4.h
> tml for command line syntax
> 
> 
> 
> -Douglas
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: Oliver [mailto:a9503280@unet.univie.ac.at]
> > Sent: Friday, October 06, 2000 2:06 PM
> > To: Prolog
> > Subject: Executable File
> > 
> > 
> > Hi there,
> > 
> > Please, can anybody tell us how we can run the following program:
> > 
> >     main :-
> >         write('Content-type: text/html'), nl, nl,
> >         write('<HTML>'),
> >         write('Hello world.'),
> >         write('</HTML>').
> > 
> > in the WWW? We use SWI-Prolog. Do we need CGI? If yes, how 
> > can we make a
> > 
> > CGI-file?
> > 
> > So long,
> > 
> > Gerd
> > 
> > 
> > 
> > 
> > ----------------
> > * To UNSUBSCRIBE, please use the HTML form at
> > 
> >     
> > http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> > 
> > or send mail to prolog-request@swi.psy.uva.nl using the 
> > Subject: "unsubscribe"
> > (without the quotes) and *no* message body.
> > 
> > ** An ARCHIVE of this list is maintained at
> > 
> >     
> http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> > 
> 

