[REQUEST] FASTCGI and FREEBASIC

Linux specific questions.
Post Reply
Louis
Posts: 2
Joined: Mar 24, 2010 17:05

[REQUEST] FASTCGI and FREEBASIC

Post by Louis »

Hello there friends.

I posted a topic at the beginners section ( http://www.freebasic.net/forum/viewtopic.php?p=132493 ) and it seems it wasn't the right section at all.

My inquiry remains the same.

Does anyone has any sample code for a FASTCGI application in Freebasic?

I'm running debian lenny and apache.

It would be greatly appreciated.

Thanks in advance.

-Louis
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Post by sir_mud »

Here's the tiny-fcgi example:

Code: Select all

    #include "fastcgi/fcgi_stdio.bi"

        var count = 0
        while FCGI_Accept() >= 0
        count += 1
            ? !"Content-type: text/html\r\n"
                  ? !"\r\n"
                   ? "<title>FastCGI Hello!</title>"
                   ? "<h1>FastCGI Hello!</h1>"
                   ? using "Request number ### running on host <i>&</i>"; count, getenv("SERVER_NAME"));
        wend
jdmcbride
Posts: 28
Joined: Aug 06, 2016 16:13

Re: [REQUEST] FASTCGI and FREEBASIC

Post by jdmcbride »

Small error in your eample will abort the compile.

change:
? using "Request number ### running on host <i>&</i>"; count, getenv("SERVER_NAME"));

to

? using "Request number ### running on host <i>&</i>"; count, getenv("SERVER_NAME");
Post Reply