|
Posted by NC on 01/03/07 19:32
Vincent Delporte wrote:
>
> I'm interested in hearing reflections by seasoned web app
> developpers about the different ways to write PHP apps,
> and especially how they compare in terms of performance,
> whether it's the PHP part or connections to MySQL.
On which HTTP server?
> As far as I know, there are different ways to write a PHP application:
> - CGI, ie. the usual way : some PHP code in web pages, and the
> PHP interpreter is loaded each time a PHP page is called
Yes, but it has not been the usual way for years; most hosting
companies these days do either FastCGI or mod_php.
> - FastCGI : apparently, the interpreter is loaded at boot time; the
> application itself might also be compiled and loaded once
Also, the preferred way of running PHP under Zeus.
> - mod_php : same as FastCGI?
Nope. Different executables. mod_php is a library which Apache
uses to process PHP scripts (there is a similar library for IIS as
well). FastCGI is a standalone executable.
> Any tips much appreciated, thank you.
Check the documentation for your HTTP server. It will likely have
some information about performance improvement with PHP.
Generally speaking, CGI is the worst performer. The choice
between FastCGI and server modules will depend on the HTTP
server you are using.
Cheers,
NC
Navigation:
[Reply to this message]
|