Configuring a web server I haven't written yet...

From: Date: Fri, 24 Jan 2003 09:18:29 +0000
Subject: Configuring a web server I haven't written yet...
Groups: php.windows 
Request: Send a blank email to php-windows+get-18067@lists.php.net to get a copy of this message
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

« previous php.windows (#18067) next »