[suPHP] SuPHP recursive forking
Brock Noland
brockn at gmail.com
Thu Sep 25 16:29:32 CEST 2008
On Thu, Sep 25, 2008 at 5:38 AM, Sebastian Marsching <
sebastian at marsching.com> wrote:
> Hi,
>
> J.D. Tysko schrieb:
>
> > We have a PHP application which needs to exec off another PHP process.
> > The problem is, is that when we use a command with "php" in it,
> > recursive forking is started.
>
> When PHP is called and the CGI specific environment variables (like
> PATH_INFO, PATH_TRANSLATED, etc.) are set, PHP executes the script
> specified by this environment variables and not the script specified on
> the command line.
>
> Therefore after forking, before executing another instance of PHP you
> have to unset all the CGI environment variables in order to make PHP
> execute the right script.
I would use env -i:
$ printenv | wc -l
28
$ env -i printenv | wc -l
0
Brock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.marsching.com/pipermail/suphp/attachments/20080925/10944550/attachment.htm
More information about the suPHP
mailing list