From: MuTSuMi'S LoVe
Subject: Use LISPs scripts as web applications
Date: 
Message-ID: <Xns93AC8265394ECmutsumispainjasminwa@62.151.16.60>
Hi!

I want use LISPs scripts as web applications, but I don't know to access 
the extern variables (v.g. REQUEST_METHOD), How can I to access this 
variables in LISP? (I use a Apache Server).

Thank you for your attention and sorry for my english.

From: Kaz Kylheku
Subject: Re: Use LISPs scripts as web applications
Date: 
Message-ID: <cf333042.0307020623.2f343974@posting.google.com>
"MuTSuMi'S LoVe" <·······@spain.jasminwagner.com> wrote in message news:<····································@62.151.16.60>...
> Hi!
> 
> I want use LISPs scripts as web applications, but I don't know to access 
> the extern variables (v.g. REQUEST_METHOD), How can I to access this 
> variables in LISP? (I use a Apache Server).

See question 2-11 in the comp.lang.lisp FAQ.
From: Kenny Tilton
Subject: Re: Use LISPs scripts as web applications
Date: 
Message-ID: <3F02EC4E.6060404@nyc.rr.com>
Kaz Kylheku wrote:
> "MuTSuMi'S LoVe" <·······@spain.jasminwagner.com> wrote in message news:<····································@62.151.16.60>...
> 
>>Hi!
>>
>>I want use LISPs scripts as web applications, but I don't know to access 
>>the extern variables (v.g. REQUEST_METHOD), How can I to access this 
>>variables in LISP? (I use a Apache Server).
> 
> 
> See question 2-11 in the comp.lang.lisp FAQ.

As in:

    http://faqs.jmas.co.jp/FAQs/lisp-faq/part2


-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Everything is a cell." -- Alan Kay
From: Marco Baringer
Subject: Re: Use LISPs scripts as web applications
Date: 
Message-ID: <m2isqlw2sj.fsf@bese.it>
"MuTSuMi'S LoVe" <·······@spain.jasminwagner.com> writes:

> Hi!
> 
> I want use LISPs scripts as web applications, but I don't know to access 
> the extern variables (v.g. REQUEST_METHOD), How can I to access this 
> variables in LISP? (I use a Apache Server).
> 
> Thank you for your attention and sorry for my english.

this bit of code from PORT (part of CLOCC) could be helpful:

(defun getenv (var)
  "Return the value of the environment variable."
  #+allegro (sys::getenv (string var))
  #+clisp (sys::getenv (string var))
  #+(or cmu scl)
  (cdr (assoc (string var) ext:*environment-list* :test #'equalp
              :key #'string))
  #+gcl (si:getenv (string var))
  #+lispworks (lw:environment-variable (string var))
  #+lucid (lcl:environment-variable (string var))
  #+mcl (ccl::getenv var)
  #+sbcl (sb-ext:posix-getenv var)
  #-(or allegro clisp cmu gcl lispworks lucid mcl sbcl scl)
  (error 'not-implemented :proc (list 'getenv var)))

(defun (setf getenv) (val var)
  "Set an environment variable."
  #+allegro (setf (sys::getenv (string var)) (string val))
  #+clisp (setf (sys::getenv (string var)) (string val))
  #+(or cmu scl)
  (let ((cell (assoc (string var) ext:*environment-list* :test #'equalp
                     :key #'string)))
    (if cell
        (setf (cdr cell) (string val))
        (push (cons (intern (string var) "KEYWORD") (string val))
              ext:*environment-list*)))
  #+gcl (si:setenv (string var) (string val))
  #+lispworks (setf (lw:environment-variable (string var)) (string val))
  #+lucid (setf (lcl:environment-variable (string var)) (string val))
  #-(or allegro clisp cmu gcl lispworks lucid scl)
  (error 'not-implemented :proc (list '(setf getenv) var)))


-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen
From: MuTSuMi'S LoVe
Subject: Re: Use LISPs scripts as web applications
Date: 
Message-ID: <Xns93AC9D669B43Fmutsumispainjasminwa@62.151.16.60>
Marco Baringer <··@bese.it> wrote in ···················@bese.it:

> "MuTSuMi'S LoVe" <·······@spain.jasminwagner.com> writes:
> 
>> Hi!
>> 
>> I want use LISPs scripts as web applications, but I don't know to
>> access the extern variables (v.g. REQUEST_METHOD), How can I to
>> access this variables in LISP? (I use a Apache Server).
>> 
>> Thank you for your attention and sorry for my english.
> 
> this bit of code from PORT (part of CLOCC) could be helpful:
> 
> (defun getenv (var)
>   "Return the value of the environment variable."
>   #+allegro (sys::getenv (string var))
>   #+clisp (sys::getenv (string var))
>   #+(or cmu scl)
>   (cdr (assoc (string var) ext:*environment-list* :test #'equalp
>               :key #'string))
>   #+gcl (si:getenv (string var))
>   #+lispworks (lw:environment-variable (string var))
>   #+lucid (lcl:environment-variable (string var))
>   #+mcl (ccl::getenv var)
>   #+sbcl (sb-ext:posix-getenv var)
>   #-(or allegro clisp cmu gcl lispworks lucid mcl sbcl scl)
>   (error 'not-implemented :proc (list 'getenv var)))
> 
> (defun (setf getenv) (val var)
>   "Set an environment variable."
>   #+allegro (setf (sys::getenv (string var)) (string val))
>   #+clisp (setf (sys::getenv (string var)) (string val))
>   #+(or cmu scl)
>   (let ((cell (assoc (string var) ext:*environment-list* :test
>   #'equalp 
>                      :key #'string)))
>     (if cell
>         (setf (cdr cell) (string val))
>         (push (cons (intern (string var) "KEYWORD") (string val))
>               ext:*environment-list*)))
>   #+gcl (si:setenv (string var) (string val))
>   #+lispworks (setf (lw:environment-variable (string var)) (string
>   val)) #+lucid (setf (lcl:environment-variable (string var)) (string
>   val)) #-(or allegro clisp cmu gcl lispworks lucid scl)
>   (error 'not-implemented :proc (list '(setf getenv) var)))
> 
> 

Thank you!!!!.

This is really good thing, this works!!!.