[gambit-list] gambit cgi error 11
feeley at iro.umontreal.ca
Wed Jun 13 07:11:15 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
On 13-Jun-07, at 2:51 AM, |/|/ Bendick wrote:
> Hi, I'm trying to use gambit 4.0b22 for CGI but am having a problem. A
> simple script:
> (define (main . args)
> (display "Content-type: text/html\n\nhi\n\n")
> (force-output (current-output-port))
> But I get a "500 - Internal Server Error" every time I try to hit the
> page. The web server (lighttpd-1.4.15) tells me the script is exiting
> with a return value of 11 which the gambit manual doesn't document.
> The script runs fine from command line. If I just throw:
> echo "Content-type: text/html"
> echo ""
> echo "hi";
> into the file, it works correctly so it doesn't look like a
> permission/configuration/whatever error with the web server. Any ideas
> on code 11?
Do you know under what user the script is executed by lighttpd? With
Apache I've had similar problems where the user did not have the
permission to execute gsi-script.
Small comments about your code: 1) you don't need the (current-output-
port) argument to force-output because it is the default, 2) you
don't need the force-output because that will be done for stdout when
the process exits. So the script could simply be:
(display "Content-type: text/html\n\nhi\n\n")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-----END PGP SIGNATURE-----
More information about the Gambit-list