On Thu, Nov 06, 2003 at 11:11:13AM +0200, Tom Diamond wrote: : : I am trying to implement a simple web server (in Java) and I want to add : php support. For the moment I do a "Process p = : Runtime.getRuntime().exec("php /path/to/php/file")", I grab the output, : seperate headers from body and send it back to the client. For simple : php pages this thing works fine. But (obviously) it does not work for : pages requiring parameters. : So my question is what exactly the php executable searches for in the : environment? Which are the (CGI???) variables I'll have to set so that : it will process POST and GET correctly?
POST and GET variables come through via the web server. Since your PHP script is getting invoked at the command line, it does not get these variables. So you'll have to find another way to pass these variables. Maybe via a bunch of command-line switches? Or an external, session-ish data store? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php