[hunchentoot-devel] Best way to run Hunchentoot on Port 80, Proxy-Module for Hunchentoot

Christoph Senjak christoph.senjak at googlemail.com
Sun Oct 18 03:03:52 UTC 2009


Hello again.

>> That shouldn't be hard to code. There is also the possibility to use
>> CGI with Hunchentoot and PHP for that, see:
>>
>>  http://cyrusharmon.org/projects?project=hunchentoot-cgi
>>
>>  Best,
>>
> Ah nice. Actually, yesterday I was reading the CGI-Specification to
> code exactly this. Thank you. I will try to use php-cgi. This is the
> default fastcgi-interpreter, but it also has a cgi-interface.

Well, I had to add SCRIPT_FILENAME to the environment-variables that
are passed to the CGI-Scripts to be able to run php-scripts (it took
me a day to find this documented - google loves to list php-tutorials
with no helpful content ...). Now I can run them - sort of. But seems
like the session-management somehow doesnt work. I also added a line

("HTTP_COOKIE" . ,(let ((r ""))
             (dolist (cookie (hunchentoot:cookies-in*))
               (setf r (concatenate 'string (car cookie) "=" (cdr
cookie) ";" r)))
             r))

which adds the environmental-variable HTTP_COOKIE and should be
correct (I couldnt find out whether the cookies should be separated
via a semicolon or something else, but seems like semicolon is right,
nor could I find out whether to encode these cookies somehow before
putting them i this variable, but seems like none of the cookies I saw
has any special characters). There seems to be a cookie sent to the
php-script. When adding a (format t r), I see a string of the form
sid=<random-sid>. So the php-engine /should/ know about the cookies.
Still, it doesnt work. Could it be that hunchentoot doesnt list some
cookies in (hunchentoot:cookies-in*), or removes outgoing cookies?

Or any Ideas what else I have to set?

Regards,
Christoph




More information about the Tbnl-devel mailing list