Trying to port fastcgi to JavaScript
Franky Braem <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm trying to execute a JavaScript script using mod_fastcgi. I can't get
my test program to work:
My application does this:
FCGX_Request request;
FCGX_Init();
int listen_socket = FCGX_OpenSocket(":9000", 100);
FCGX_InitRequest(&request, listen_socket, FCGI_FAIL_ACCEPT_ON_INTR);
while (FCGX_Accept_r(&request) == 0)
{
char *s = "Hello from fcgi";
FCGX_PutStr(s, strlen(s), request.out);
}
I configured Apache as follows:
LoadModule fastcgi_module modules/mod_fastcgi.dll
FastCGIExternalServer
"c:/development/wxjs/wxjs2/bin/Debug/wxJS_fcgi.exe" -host localhost:9000
<Directory c:/xampp/htdocs/fcgi>
SetHandler fastcgi-script
Options execCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
But when I load http://localhost/fcgi/test.wxjs, I get a server error
and see the following in the logs:
[Wed Feb 06 22:22:40 2008] [alert] [client 127.0.0.1] FastCGI: failed to
connect to (dynamic) server "C:/xampp/htdocs/fcgi/test.wxjs": something
is seriously wrong, any chance the socket/named_pipe directory was
removed?, see the FastCgiIpcDir directive
[Wed Feb 06 22:22:40 2008] [error] [client 127.0.0.1] FastCGI:
incomplete headers (0 bytes) received from server
"C:/xampp/htdocs/fcgi/test.wxjs"
What am I doing wrong?
Franky.
PS. I'm using Apache 2.2.6 on Windows XP, fastcgi 2.4.0
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/