Page 1 of 1

Difference between mod_php and php-cgi

Posted: Sun Nov 30, 2008 11:13 pm
by sentino
I installed LAMP on ubuntu by following the documentations. I read once that Apache talks with php through mod_php and after that I read that php has an interface to Apache through php-cgi.
First I am confused between these 2 terms. What is the difference between them and which one comes with the default installation.
Thank you

Re: Difference between mod_php and php-cgi

Posted: Sun Nov 30, 2008 11:46 pm
by requinix
There are two ways to install PHP: as a module or as CGI.
"mod_php" is the module. mod_cgi allows Apache to run CGI scripts, and you'd configure PHP to be handled that way.

The default - and IMO better - would be the module.

Re: Difference between mod_php and php-cgi

Posted: Mon Dec 01, 2008 11:32 am
by sentino
Thank you.
I would like to learn more about mod_php and mod_cgi. I didn't find good documentation in google. Could anybody please give me some references to learn more about the difference between these 2 terms and the advantage of both.