Re: _GET/_POST vars passed to PHP how?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: _GET/_POST vars passed to PHP how?

From: Gordon Burditt <gordonb.o5hi5@burditt.org>
Date: Wed Jul 20 2005 - 21:59:48 CEST

>Are these passed by the webserver to PHP using
>commandline arguments or by environment variable?

If PHP is run as an Apache module, it's done via some kind of
internal interface, and unless you're writing your own modules,
you shouldn't need to care.

If PHP is run as a CGI, it's done by the interface defined by CGI:
GET variables show up in environment variables (the CGI has to
separate them), and PUT variables are available on stdin (again,
the CGI has to separate them). Environment variables indicate
whether this is GET or PUT and how much input is available on
stdin.

If PHP is run from the command line, the variables are generally
not passed at all, and there may be no web server involved at all.

                                        Gordon L. Burditt
Received on Mon Oct 17 21:12:58 2005