Re[2]: how do I do FCGI_Accept() loop?
jlist9-FFYn/[email protected]
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Ron, I think the reason is that it's not necessary for PHP. With PHP, you don't have to implement the FCGI_Accept() loop. Instead, it can be built in into PHP. Run php -v to see if it supports fastcgi already. If it says cgi-fcgi, then it does. Otherwise, you'll need to build PHP from source with --enable-fastcgi option. Jack Wednesday, December 14, 2005, 9:02:05 PM, you wrote: > There seem to be examples of fastcgi processes written in everything *but* > PHP! Is there no sample out there anywhere or is it just not a good idea > for some reason? > -----Original Message----- > From: fastcgi-developers-bounces+ron=rudman.org-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org > [mailto:fastcgi-developers-bounces+ron=rudman.org-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org] On > Behalf Of Jon Ribbens > Sent: Wednesday, December 14, 2005 8:24 AM > To: Rares Marian > Cc: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org > Subject: Re: [FASTCGI] how do I do FCGI_Accept() loop? > Rares Marian <[email protected]> wrote: >> I know how to get it to work in perl and C. How does it work in PHP or >> Ruby or Python? >> >> Preferably the PHP solution is what I'm looking for. >> >> Something like while FGCI_Accept()>=0 { $count=$count+1; echo $count; }. > Don't know about PHP (I don't think it works like that - it does the Accept > stuff for you), but in Python you could use my fcgi.py module > (http://jonpy.sf.net/) and the code would be: > count = 0 > class Handler(cgi.Handler): > def process(self, req): > global count > count += 1 > fcgi.Server({fcgi.FCGI_RESPONDER: Handler}).run() > (effectively the 'Accept' loop is inside the fcgi.Server.run method) (NB the > 'count += 1' may well not be thread-safe) ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/