Higher perfs by running PHP app in (Fast|S)CGI?
Higher perfs by running PHP app in (Fast|S)CGI?
am 07.01.2008 09:31:02 von DFS
Hello
I just read this article on running web apps in SCGI, and was
wondering...
- if it's possible to run PHP apps this way: I only know of running
them in plain CGI mode (ie. the interpreter is started with very
request, and the pages reparsed each time), and mod_php (the
interpreter is loaded once when the web server starts, but pages are
parsed for every request, unless using eg. APC or eAccelerator to
cache them)
- if it is indeed possible, are performances higher than using
mod_php?
Thank you.
Re: Higher perfs by running PHP app in (Fast|S)CGI?
am 07.01.2008 10:30:12 von Michael Fesser
..oO(Gilles Ganault)
>I just read this article on running web apps in SCGI, and was
>wondering...
>- if it's possible to run PHP apps this way: I only know of running
>them in plain CGI mode (ie. the interpreter is started with very
>request, and the pages reparsed each time), and mod_php (the
>interpreter is loaded once when the web server starts, but pages are
>parsed for every request, unless using eg. APC or eAccelerator to
>cache them)
One of my hosts runs plain CGI, the other FastCGI. Both work very well.
>- if it is indeed possible, are performances higher than using
>mod_php?
No. The module will almost always be the fastest, but (Fast)CGI also has
its benefits. It's easier to secure the environment without forcing too
many restrictions onto the user.
If you need as much performance as possible, then get a dedicated or at
least a virtual server and run the server module. But on a shared host I
usually prefer the (Fast)CGI version.
Micha
Re: Higher perfs by running PHP app in (Fast|S)CGI?
am 07.01.2008 12:08:01 von DFS
On Mon, 07 Jan 2008 10:30:12 +0100, Michael Fesser
wrote:
>One of my hosts runs plain CGI, the other FastCGI. Both work very well.
So it is possible to run a PHP interpreter and/or application in
FastCGI, ie. not as mod_php or PHP-CGI?
>If you need as much performance as possible, then get a dedicated or at
>least a virtual server and run the server module. But on a shared host I
>usually prefer the (Fast)CGI version.
Good to know. Thanks.
Re: Higher perfs by running PHP app in (Fast|S)CGI?
am 07.01.2008 12:28:00 von Michael Fesser
..oO(Gilles Ganault)
>On Mon, 07 Jan 2008 10:30:12 +0100, Michael Fesser
>wrote:
>>One of my hosts runs plain CGI, the other FastCGI. Both work very well.
>
>So it is possible to run a PHP interpreter and/or application in
>FastCGI, ie. not as mod_php or PHP-CGI?
Yes.
Micha