Re: cgi.d - fastcgi - LightTPD is not cooperative

2014-10-03 Thread Adam D. Ruppe via Digitalmars-d-learn
Hmm, I don't know and don't have it set up on windows to try 
right now. My suggestion is to look for getting it to work with C 
or C++ - since my cgi.d lib uses a C library, it should work 
exactly the same way in terms of configuration.


cgi.d - fastcgi - LightTPD is not cooperative

2014-10-02 Thread Sycam_Inc via Digitalmars-d-learn
This is a cross-post from the issue i started on github (i figure 
i'll probably get a quicker response here)


FastCGI dosen't cooperate with LightTPD on windows.
as soon as lighttpd starts up and initializes fastcgi unknown 
listenType (0) is printed out and the server shuts down

I've isolated that this is caulsed by the reciveloop on line 2675


Re: cgi.d - fastcgi - LightTPD is not cooperative

2014-10-02 Thread Adam D. Ruppe via Digitalmars-d-learn

Try running the program yourself with a port argument

yourprogram.exe --port 3000

for example, then have lighttpd configured to connect to that 
port for the application. That's what I had to do for nginx on 
Windows, lighttpd might be the same thing.


Re: cgi.d - fastcgi - LightTPD is not cooperative

2014-10-02 Thread Sycam_Inc via Digitalmars-d-learn

On Thursday, 2 October 2014 at 13:25:14 UTC, Adam D. Ruppe wrote:

Try running the program yourself with a port argument

yourprogram.exe --port 3000

for example, then have lighttpd configured to connect to that 
port for the application. That's what I had to do for nginx on 
Windows, lighttpd might be the same thing.


Ok That Worked, but the GenericMain never runs

module main;


//import std.stdio;
import arsd.cgi;

void Req(Cgi c)
{
new File(C:/c/a.text).write(hello);
c.write(This is a test);
c.close();
}

mixin GenericMain!(Req);

when running in the browser the page just continues to load and 
the lighttpd console shows no output from it and it dosent write 
anything in the file.


Re: cgi.d - fastcgi - LightTPD is not cooperative

2014-10-02 Thread Adam D. Ruppe via Digitalmars-d-learn

On Thursday, 2 October 2014 at 13:53:48 UTC, Sycam_Inc wrote:
when running in the browser the page just continues to load and 
the lighttpd console shows no output from it and it dosent 
write anything in the file.


What url did you use in the browser and what's your lighttpd 
config look like? The program might be correct and the config is 
just off.


Re: cgi.d - fastcgi - LightTPD is not cooperative

2014-10-02 Thread Sycam_Inc via Digitalmars-d-learn

On Thursday, 2 October 2014 at 14:17:42 UTC, Adam D. Ruppe wrote:

On Thursday, 2 October 2014 at 13:53:48 UTC, Sycam_Inc wrote:
when running in the browser the page just continues to load 
and the lighttpd console shows no output from it and it dosent 
write anything in the file.


What url did you use in the browser and what's your lighttpd 
config look like? The program might be correct and the config 
is just off.


Folders
C:\c - server folder
C:\c\cgi-bin - cgi folder
C:\c\cgi-bin\test.exe - cgi file

example url: loclahost\cgi-bin\test.exe

Relevent Config:
server.document-root = C:\c
fastcgi.debug = 1
fastcgi.server =
( /cgi-bin/ =
( localhost =
(
max-procs = 1,
bin-path =  server.document-root + \cgi-bin\Test.exe --port 
9000 ,

host = 127.0.0.1,
port = 9000
)
)
)

p.s. lighttpd exits on the event of a fast-cgi process not 
starting