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 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 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


cgi.d - fastcgi - how am i suppose to link in libfcgi.a or libfcgi.lib

2014-10-01 Thread Sycam_Inc via Digitalmars-d-learn
im truing to use the fastcgi support provided by cgi.d found at 
https://github.com/adamdruppe/arsd/blob/master/cgi.d with the 
-version fastcgi flag on the compiler.

however its creator said it requires the fastcgi C lib

reviously, it spoke regular CGI, FastCGI (with help
from a C lib) and HTTP (with help from the netman.d
and httpd.d files in that github).

and i cant find a copy of it that can link with D, I've tried:

building it from source (complains about missing file 
sys/socket.h)

converting it with objconv (threw a bunch of errors)
using coffimplib (threw a bunch of errors)
using GDC (complains about undefined refrences in libphobos2.a 
socket.o (windows is so much fun))


what should i consider next?


Re: cgi.d - fastcgi - how am i suppose to link in libfcgi.a or libfcgi.lib

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

On Wednesday, 1 October 2014 at 17:09:06 UTC, Adam D. Ruppe wrote:
Try linking in these .obj files that I compiled for windows a 
while ago:


http://arsdnet.net/dcode/fcgi_win.zip

so unzip that, put it in your project directory and just add 
both .obj files to your compile command line along with 
-version=fastcgi.


It has been a LONG time since I used that, but I'm pretty sure 
that worked when I tried it on 32 bit windows and running the 
program through IIS.


Thank You, You have made a days worth of headache worth it.
Now to make it work with lighttdp