faqts : Computers : Programming : Languages : PHP : Installation and Setup : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

67 of 78 people (86%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

What is the difference between CGI PHP and a PHP module?

Jun 16th, 1999 07:00
Nathan Wallace, Chad Cunningham


CGI is just an interface to execute a program. When you use php this
way, the web server starts up the php binary and feeds it the php script
(more or less...). PHP starts up, parses the file, returns the static
html output and then shuts down.

With the module, php is no longer a seperate program. It is linked with
apache so that apache and php run together as a single program. This
way, when the webserver get's a request for the script, apache
interperates it natively. Saves the high overhead of starting and
killing the interperator each time.