Try using putenv() in your PHP scripts. Note that to unset an environment variable, you use putenv("VAR"), not putenv("VAR="). (Because apparently the PHP folks would rather implement something bizarre than just use unsetenv(3)).
-- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | On Thu, Sep 25, 2008 at 09:38:44AM -0400, J.D. Tysko wrote: > Hi, thanks for your reply. > > I think I understand what you're saying, but I'm a little unclear how I > can unset those CGI specific variables *after* forking since I'm using > system() and like commands which do the fork on their own. The only > thing I can think of is using the "temporary" environment variables > (like: system("PATH_INFO= PATH_TRANSLATED php --version");) but that > could end up being quite a long command line. Is there another way and > can you give a code example? > > Thanks, > J.D. Tysko > Software Engineer > BCS Engineering > > > > 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. > > > _______________________________________________ > suPHP mailing list > suPHP@lists.marsching.biz > http://lists.marsching.com/mailman/listinfo/suphp _______________________________________________ suPHP mailing list suPHP@lists.marsching.biz http://lists.marsching.com/mailman/listinfo/suphp