Search code examples
apachelispclisp

linux+apache2+mod_lisp+CLISP revisited


Tried to follow guide from previous question Apache + mod_lisp + clisp

CLISP is installed and works sucessfully:

(load "modlisp-clisp") (modlisp:modlisp-server) runs ok ie endlessly

Python works fine out of /usr/lib/cgi-bin via localhost

Tried to make clisp server work out of /var/www/html/lsp

browser access via localhost/lsp prints : mod_lisp 2.0 This is a constant html string sent by mod_lisp 2.0 + CLISP + apache + Linux

BUT localhost/lsp/test.lisp just returns internal server error (chmod 777 test.lisp done)

test.lisp at clisp interpreter comes up no package with name "content-type":

(defun xyz()
    (format t 'Content-Type: text/html;charset=utf-8')
    (print())
    (print())
    (print(coerce '(#\u2211) 'string))
    (print(coerce '(#\U20AC) 'string))
    (format t "hello world!")
)
(xyz)

Details: uname -a Linux me-H97N-WIFI 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

apache2ctl -M AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Loaded Modules: ... lisp_module (shared) ..

/etc/apache2/sites-enables/000-default.conf:

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all

(MY LISP AMENDMENTS:)

Location /var/www/html/lsp> SetHandler lisp-handler Location>

/etc/apache2/mods-enabled/lisp.conf:

LispServer 127.0.0.1 3000 "/var/www/html/lsp"

Where have I gone wrong? Should lisp server somehow operate out of cgi-bin alongside python? how do i send html headers?


Solution

  • '
    

    Is not a valid string delimiter. It is the quote operator, which causes the form it marks to be unevaluated, so you can call functions operating on those forms themselves.

    Try replacing the single quote with the double quote, which will cause it to be read as a string.

    (format t "Content-Type: text/html;charset=utf-8")