Forum OpenACS Development: Re: Using Perl CGI

Collapse
5: Re: Using Perl CGI (response to 4)
Posted by Kika B on
Thanks Dave for the quick reply.

I did read Jon's page before. My permissions are 755 which should be good.

www.tcl.tk/man/aolserver3.0/con-ch3.htm#120876 mentions "A trailing slash on the URL is not allowed" - is this wrong too? They mention that a trailing slash on the directory is optional.

Can you confirm that setting GET and POST methods should be enough for accessing this CGI explicitely through the URL rather than a form, as Pietro (and I) are trying to do?

Thanks again,

Kika

Collapse
6: Re: Using Perl CGI (response to 5)
Posted by Kika B on
Dave -

I was trying modifying the config script in many ways, including trailing slashes on either URL or disk path, but the results are the same. It seems like the CGI mapping is ignored altogether and the directory under www is searched instead, so if I put a Perl script there it is found, but returned as a text file rathen then a CGI.

I would suspect the nscgi module is not loaded correctly. Where can I verify that?

I have in the script the following lines:

# CGI interface -- nscgi
#
ns_section "ns/server/${servername}/module/nscgi"
ns_param map "GET /cgi /usr/local/cgi/" ;# CGI script file dir (GET).
ns_param map "POST /cgi /usr/local/cgi/" ;# CGI script file dir (POST).
ns_param map "GET /calendar /web/mydir/www/calendar/" ;# CGI script file dir (GET).
ns_param map "POST /calendar /web/mydir/www/calendar/" ;# CGI script file dir (POST).
ns_param Interps CGIinterps

ns_section ns/interps/CGIInterps
ns_param .pl /usr/bin/perl

ns_section "ns/server/${servername}/modules"
ns_param nssock ${bindir}/nssock${ext}
ns_param nslog ${bindir}/nslog${ext}
ns_param nssha1 ${bindir}/nssha1${ext}
ns_param nscache ${bindir}/nscache${ext}
ns_param nscgi ${bindir}/nscgi${ext}

Any more insight here?

Thanks again,

Kika