<div dir="ltr"><div class="gmail_quote">On Thu, Sep 25, 2008 at 5:38 AM, Sebastian Marsching <span dir="ltr">&lt;<a href="mailto:sebastian@marsching.com">sebastian@marsching.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
J.D. Tysko schrieb:<br>
<div class="Ih2E3d"><br>
&gt; We have a PHP application which needs to exec off another PHP process.<br>
&gt; The problem is, is that when we use a command with &quot;php&quot; in it,<br>
&gt; recursive forking is started.<br>
<br>
</div>When PHP is called and the CGI specific environment variables (like<br>
PATH_INFO, PATH_TRANSLATED, etc.) are set, PHP executes the script<br>
specified by this environment variables and not the script specified on<br>
the command line.<br>
<br>
Therefore after forking, before executing another instance of PHP you<br>
have to unset all the CGI environment variables in order to make PHP<br>
execute the right script.</blockquote><div><br></div><div>I would use env -i:&nbsp;</div><div><br></div><div>$ printenv | wc -l</div><div>28</div><div>$ env -i printenv | wc -l</div><div>0</div><div><br></div><div>Brock</div>
<div>&nbsp;</div></div></div>