You should check out the CGI spec:

http://hoohoo.ncsa.uiuc.edu/cgi/overview.html
http://hoohoo.ncsa.uiuc.edu/cgi/interface.html

Basicly, you have to have the web server create a process, and then all those CGI values (REQUEST_METHOD, QUERY_STRING, REMOTE_HOST, REMOTE_USER) are first set as environment variables for the process. Then you execute the file with php.exe.

You do not need to intialize the superglobals yourself... PHP will do that for you, according to the environment values you set.

--

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424

Hi guys,

I'm writing a web server for Windows. I want to know how to make it support
PHP.

Here's the easy bit (which I know how to do)...
1) A client requests a web page called "anything.php"
2) The server notices the extension ".php", looks this up in the server's
configuration settings, and says "Aha - this is a PHP script".
3) The server runs the PHP script, and sends the output stream back to the
client.

Here's the bit I _DON'T_ know how to do...

How the hell can my server INITIALISE the superglobal variables $_GET,
$_POST, $_SERVER, $_SESSION, etc. in preparation for running the script?

... I mean, it's an easy enough matter to call:

        system("php something.php")

to run a PHP script ... but that won't initialise the superglobal variables.
There doesn't appear to be a command line parameter to php.exe that lets you
specify this information. So how's it done? How do other web servers do it?

Any suggestion would be appreciated.

Jill




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to