Subject: RE: Executable File

From: "Douglas Miles (Volt Computer)" <[email-masked]>
Date: Fri, 6 Oct 2000 15:26:00 -0700

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:[email-masked]]
> > 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 [email-masked] 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/
> > 
>