tags:

views:

306

answers:

5

does FastCGI work well with PHP? It seems that some people running Ruby on Rails have problems with FastCGI, but is it fine with PHP?

+3  A: 

Does PHP work with FastCGI? [FastCGI official FAQ]

Moayad Mardini
A: 

I use FastCGI and PHP, and don't appear to have any issues.

Rishabh Mishra
+1  A: 

Lighttpd uses FastCGI by default for PHP, as the only other option is to use CGI, and it's working flawlessly.

tstenner
how about apache... is it fine too?
動靜能量
Apache has mod_fastcgi which is used for PHP and ASP (with mono), but I haven't tried it yet.
tstenner
+1  A: 

We running our internal intranet application using PHP and lighttpd using fastcgi and it works without problems.

Find a good tutorial here (Linux): http://www.cyberciti.biz/tips/lighttpd-php-fastcgi-configuration.html

PepperBob
is apache ok too?
動靜能量
+1  A: 

I use FastCGI (through php-cgi) with Cherokee for PHP and it's just grand. No issues.

I would definitely recommend installing xcache at the same time. The performance boost will blow your socks into next week.

I've just seen you asking about Apache in one of the comments. I don't know why you'd choose FastCGI over mod_php. The performance difference would be almost invisible but I'm certain mod_php would be slightly faster (and a ton more simple to set up).

Well I genuinely thought that was the case. And then I read this: http://www.gnegg.ch/2006/08/mod_php-lighttpd-fastcgi-whats-fastest/

And it looks like Apache+FastCGI is faster than Apache+mod_php. Odd.

Oli