| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Senior Member
Super #1
Joined in Jan 2005
1,546 posts
Gave thanks: 70
Thanked 33 times
|
I know I could probably look this up...but I saw something about this somewhere and it's 1:30am and I'm lazy.
So, just a random curious question - what exactly is the difference between running PHP as CGI, as opposed to Apache? (I know Surpass runs it as Apache....see I do know some stuff!) I mean does it make PHP do other things, or not do things...or...what? |
|
|
|
|
|
#2 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
|
http://en.wikipedia.org/wiki/Common_Gateway_Interface
Basically, in CGI mode the web server calls a CGI script whenever the script's URL is requested. Each time the script is called, a new process is spawned and the php binary is run. CGI scripts can be in almost any language, with PHP being one of them. When the CGI script produces output, Apache sends it to the browser. When Apache itself handles PHP, what is happening is .php scripts are being processed by Apache's mod_php. This allows better control over what's going on, as Apache itself is executing the scripts, not handing off the processing to some third party (as in CGI). I believe it's faster this way, as well, but don't quote me on that. |
|
|
|
| This user thanks ghostcop for this great post! | ceo (November 4th, 2007) |