Re: A few quick questions
| From: | (Richard Lynch) | Date: | Thu, 06 Jul 2000 01:05:28 +0000 |
| Subject: | Re: A few quick questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5128@lists.php.net to get a copy of this message | ||
In article <001401bfe67a$ef3834e0$0101a8c0@jeff>, jburgess@sympatico.ca
("Jeff Burgess") wrote:
> 1) I've heard of people referring to php being 'compiled in a module' =
> (versus running as a CGI), and that is runs faster/less intensive on the =
> server. How does one set up php to run as a module? What are the main =
> benefits of running it as a module vs as a CGI?
When compiled as a Module, PHP becomes an actual part of the Web-server
program, which is always running, just waiting for somebody to connect.
When compiled as a CGI, the Web-server must run PHP as a separate program
for each page requested. So PHP is run over and over and over.
However, a CGI-configured machine with lots of RAM will end up having PHP
in the cache, so the running of PHP over and over will not be quite as
awful as it sounds.
There are also a few (minor) functions that CGI can't do:
virtual() -- use exec() instead
HTTP Authentication internally -- use some external HTTP Authentication or
a login page
a couple other functions I can't remember right now...
The CGI configuration *can* be run via suExec (http://www.apache.org)
which can increase PHP's power, and in some cases, the security of the box
in question. (A lot of factors involved there...)
> 2) Specifically, I'd like to use a program called 'vBulletin' as my =
> BBS, and it uses php and mySql. Does anyone have any idea how big a =
> performance hit it would take if it's running on php as a module?
[Assuming you mean "performance hit ... running as CGI]
It really depends on the machine's configuration whether CGI will have
"significant" effect as opposed to Module. The question is how much RAM
there is, and how much of the typically running processes can fit in that
RAM.
Odds are really, really good that the CGI versus Module question will be
secondary to the other considerations for choosing an ISP...
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)