For the Compleat Fan
Post Reply
Posts: 58
Joined: Thu Apr 14, 2005 1:12 am


Post by statik »

I read a few older threads here and while newlisp + fcgi was mentioned as being used or toyed with, I never could find anything that hinted at it's success...

If someone here has successfully gotten newlisp to work with fastcgi (and lighttpd would be nice too) please let me know how you managed to do so.

Or is there any ideas how it might be accomplished?

Thanks guys.

Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Hi Static,

What I can remember from FastCgi is that it somehow needs an extention
to the normal cgi to work with FastCgi, not sure if newlisp has this though and im also not sure what that is.. ;-)
I know that Clisp had once an FastCgi extention and that Rebol uses it too (commercial versions only)..
..Mmm...Perhpas Lutz knows..

-- (define? (Cornflakes))

Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Post by Lutz »

Here you find everything you need to know:
and here:

FastCGI works via a socket interface, so you would have newLISP running listening for FastCGI requests on a socket. For maximum scaleability you would run the newLISP server as an UNIX inetd process. There are examples in the newLISP manual how to configure your inetd configuration file, as an example:

Code: Select all

# in inetd.conf
fastcgi  stream  tcp  nowait  root  /usr/bin/newlisp -c fastcgi.lsp
and in /etc/services

Code: Select all

fastcgi        1234/tcp     # newLISP fastcgi requests
1234 would be the FastCGI port or whatever the correct number is. fastcgi.lsp would contain the logic necessary to receive and respond to FastCGI requests. Inside newLISP you would use print, println, read-line, write-line, read-buffer and write-buffer communicating to std/io (file handles 1 and 0). Which would automatically be redirected to 1234 by inetd.

I wonder if other schemes are possible without inetd, where FastCGI starts the newLISP process directly in this case newLISP would be started with the -p or -d option and a specific port, but i didn't read enough of the docs to find out. Most likely the inetd method described is the correct one.


Post Reply