Re: Executing a CGI script from a PHP script

From: Date: Fri, 07 Sep 2001 06:34:05 +0000
Subject: Re: Executing a CGI script from a PHP script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66342@lists.php.net to get a copy of this message
Try using virtual instead of exec, I think... Otherwise, I'm guessing you want to walk through all of $HTTP_ENV_VARS and build up a command line with each one being set followed by a ; and then your actual CGI to run. -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Patrick Dunford <a47xxy@hotmail.com> Newsgroups: php.general To: <php-general@lists.php.net> Sent: Thursday, September 06, 2001 8:06 AM Subject: Executing a CGI script from a PHP script > The server I am on uses a CGI script to get a count for home pages. With > server side includes it is executed using the Apache "exec" SSO directive > and works well. > > The problem with PHP is that the CGI script when executed by Apache sets > a lot of environmental variables that apparently aren't set by the PHP > script when using system() to run the CGI script. > > I wondered if there are any commands in PHP4 that will cause PHP/Apache > to set the environmental variables the same way as it would when Apache > executes a CGI script directly. > > -- > ======================================================================= > Patrick Dunford, Christchurch, NZ > > He makes me lie down in green pastures, he leads me beside quiet > waters, he restores my soul. He guides me in paths of righteousness > for his name's sake. > -- Psalm 23:2-3 > http://www.StudyLight.org/desk/?query=Psalm+23:2-3

« previous php.general (#66342) next »