The PHP Scalability Myth
Subject:   CGI model vs. in-process model
Date:   2003-10-17 12:58:34
From:   anonymous2
Response to: CGI model vs. in-process model


It's all about communication between the server and the program, and if you type something like:

you have no idea if CGI is going on on the server. Could be the in-process model, or even something else. (Used to be, it was (almost?) always CGI).

You need to read up.

Full Threads Newest First

Showing messages 1 through 4 of 4.

  • CGI model vs. in-process model
    2003-10-17 14:18:16  anonymous2 [View]

    But doesn't the CGI specification define the environment variables and such the get your data (such as a GET query string ) into your script even if it is in-process?

    So, I was definitly at least half wrong but aren't you still using part of the CGI spec?
    • CGI model vs. in-process model
      2003-10-18 22:27:53  anonymous2 [View]

      Wow, I never realized so many people were confused about what CGI was. There is plenty of information on the W3C's Web site.

      The query string is defined by the URI specification, not CGI. Also, when two separate ideas use some of the same standards, it doesn't mean the ideas are equivalent. Otherwise, I'm sure you could logically argue that Java and PHP are the same thing.

      PHP can run as a CGI or as an Apache module (and in a few other environments). There is a substantial performance difference between the two.
  • CGI model vs. in-process model
    2003-10-17 15:17:31  anonymous2 [View]

    Uh, wrong!!!
    Ever hear of mod_perl or FastCGI? They are both in-process (using two totally different methods), but are still CGI at the core. The first poster was absolutely correct that it's how the client passes messages back to the web server.
    • CGI model vs. in-process model
      2003-10-18 02:20:22  anonymous2 [View]

      Ever hear of the CGI specification? It defines a series of environment variables which are to be made available to a CGI process and indicates how stdin and stdout of the process should be handled.

      It has nothing to do with the client; only the server-side program and the Web server. That's because the Web server is the program generating environment variables. Some data in those variables are obtained from the client, but what the client sends is defined by the HTTP spec, not the CGI spec.