Re: php executable and environmental variables

From: Date: Thu, 06 Nov 2003 09:27:26 +0000
Subject: Re: php executable and environmental variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168689@lists.php.net to get a copy of this message
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?

« previous php.general (#168689) next »