From: Ingo Blank
Subject: CMUCL based CGI script
Date: 
Message-ID: <38F7AD7B.4B496FBC@arcormail.de>
Hi all,

I tried to use CMUCL as a CGI scripting host.

1. Shell script

#!/bin/sh
lisp -eval '(load "myscript")'

2. Lisp script "myscript.lisp"

(format t "Content-type: text/html~%~%")
(format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")

When I run this, the lisp system prints out a  <; Loading #p
"myscript.lisp"> message on stdout,
what scrambles the http header of course.

Does anybody know a solution for this problem ?

(Except recompiling the source of "load" ... :-)  )

TIA

Ingo


P.S. I'm running Apache httpd on Linux.

From: Rob Warnock
Subject: Re: CMUCL based CGI script
Date: 
Message-ID: <8d8epj$1bua$1@fido.engr.sgi.com>
Ingo Blank  <···@myokay.net> wrote:
+---------------
| I tried to use CMUCL as a CGI scripting host.
| 1. Shell script
|    #!/bin/sh
|    lisp -eval '(load "myscript")'
| 2. Lisp script "myscript.lisp"
|    (format t "Content-type: text/html~%~%")
|    (format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")
| 
| When I run this, the lisp system prints out a  <; Loading #p
| "myscript.lisp"> message on stdout, what scrambles the http header of course.
| Does anybody know a solution for this problem ?
+---------------

	% cat my-cgi
	#!/bin/sh
	cmucl -eval '(progn (setq *load-verbose* nil) (load "myscript.lisp"))'

	% cat myscript.lisp
	(format t "Content-type: text/html~%~%")
	(format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")
	(quit)

	% my-cgi
	Content-type: text/html

	<H1>Hi, I am a CGI script written in Lisp!</H1>
	% 


-Rob

-----
Rob Warnock, 41L-955		····@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043
From: David Allen
Subject: Re: CMUCL based CGI script
Date: 
Message-ID: <8dloo5$j3a$1@bob.news.rcn.net>
> 	% cat my-cgi
> 	#!/bin/sh
> 	cmucl -eval '(progn (setq *load-verbose* nil) (load "myscript.lisp"))'
> 
> 	% cat myscript.lisp
> 	(format t "Content-type: text/html~%~%")
> 	(format t "<H1>Hi, I am a CGI script written in Lisp!</H1>~%")
> 	(quit)
> 
> 	% my-cgi
> 	Content-type: text/html
> 
> 	<H1>Hi, I am a CGI script written in Lisp!</H1>
> 	% 

Thanks for posting this, I needed it to, even though I'm not the original poster.
Another question would be how to supress the " characters.  In CLISP,
if you do something like (format t "Foobar~%") it gives you

"Foobar"

on a new line.  How to get rid of the "s?

-- 
David Allen
http://opop.nols.com/
----------------------------------------
Follow your dream!  Unless it's the one where you're at work in your
underwear during a fire drill.
From: Johann Hibschman
Subject: Re: CMUCL based CGI script
Date: 
Message-ID: <mtd7nlmnxa.fsf@astron.berkeley.edu>
David Allen writes:

> Another question would be how to supress the " characters.  In CLISP,
> if you do something like (format t "Foobar~%") it gives you

> "Foobar"

> on a new line.  How to get rid of the "s?

Not on my bersion of CLISP.  Do you have an old version?

-- 
Johann Hibschman                           ······@physics.berkeley.edu
From: Cor Gest jr
Subject: Re: CMUCL based CGI script
Date: 
Message-ID: <87n1mpnxaz.fsf@cleopatra.clsnet.nl>
the CLISP 2000-03-06 (March 2000) prints witout the ("")
cor
-- 
#include<rumor.h>
/* If GNU/LINUX has no solution, you'v got the wrong problem */
/* Never install Slackware.........You might learn something */ 
/* ······@amsat.org  http://utopia.knoware.nl/users/ccgestjr */