Executing a CGI inside a PHP page (Again?)
| From: | Andrés Sulleiro | Date: | Wed, 02 Aug 2000 18:38:54 +0000 |
| Subject: | Executing a CGI inside a PHP page (Again?) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9779@lists.php.net to get a copy of this message | ||
Hi,
I am new to the list and maybe this has been discussed to death, if so, I
apologize for bringing it up. This is the deal:
I have a meta search CGI script that queries several search engines and
returns formated results. Since I have a template based site, I wanted to
call the CGI from within the PHP page (wich creates most of the site's
necesary personalization).
I have succesfully included the script in my PHP page, but my problem comes
when I execute the CGI. A typical CGI form would pass on the arguments
directly to the CGI, but now I would have to submit the search form to the
PHP and then pass the arguments to the CGI and execute it and return the
results. Here is where the problem lies. when I do a getenv(QUERY_STRING)
and pass it on the CGI it gives me a blank page, and no errors.
Is the CGI able to process the arguments, execute the script, and return the
results to the PHP page?
Note that the CGI uses a couple other perl scripts and an HTML page as
template to generate the results' look.
This works fine:
system("/script/path/program.cgi")
But this returns a blank page:
system("/script/path/program.cgi?search=value")
Could anybody help me?
Thanks!
--Andrés.
andres@sulleiro.com