Hi,
I'm trying to call a Perl CGI script from PHP.

I use the system or exec commands. That works fine. I've basically got that
sorted out.

As a test, i ran a CGI script which returns all the environment variables
that the script can see.

When I run it from the command line, I get one set which are MY environment
variables. That's fine. I expect that.

If I run the CGI as a web process ie http:/server/xxxx.cgi, then I get a set
of environment variables which reflect the web server environment. Eg. the
Path, REMOTE-USER etc.

Cool.

But if I run the CGI via PHP, I get another completely different set of
variables. These seem to reflect the environment that the server is running
in, not anything to do with the Apache server varaiables that are neccessary
for web pages.

Can anyone explain to me what's going on? Why does PHP appear to destroy the
variables of the CGI environment?

Can I make sure that when PHP calls the CGI Perl script, that the Perl
script has access to all the appropriate environment variables.

The Perl script in question accesses these environment variables because it
is a CGI script in and of itself..

Because my work environment is mixed Perl and PHP, It wuld be great to be
able to integrate them a bit so that we can use Perl generated HTML inserted
into a PHP page when appropriate.

Any insights much appreciated.

Thanks,

Norman Cates


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to