Ask a Question related to PHP Development, Design and Development.
-
w i l l #1
execute perl CGI from PHP
I am trying to execute a perl CGI from within a PHP script. I have
tried the following notation without success.
<?php include("http://" . $_SERVER['SERVER_NAME'] .
"/somedir/afile.cgi"); ?>
The CGI works on it's own without problems. Is this a limitation of
PHP?
Thanks,
w i l l
w i l l Guest
-
Off Topic: Active Perl Native Windows / cygwin perl
I have both activestate windows native perl installed and the default cygwin perl. How can I have the cygwin shell use the windows perl rather... -
Help -- how to execute "computed Perl code"
My code dynamically creates a scalar with a text string that is a valid Perl code line. How can I get Perl to execute the line contained in that... -
How to execute perl from bash
Hi everyone! I need to trip blank spaces at begin and end on certain string. I can do it executing perl -e '$str = " 2003-07-29 "; $str =~... -
[PHP][n00bie question] How to execute a perl module in php page located in unix machine?
hi list, i need to write a php page to execute a perl module on my client's unix machine, how do i do that? the perl module is some simple... -
Execute shell script from a perl script
Hi, How can I executed a Unix shell script from a Perl script. The shell script is a dump of a oracle table to a file. The perl script is for... -
Luke Ross #2
Re: execute perl CGI from PHP
Hi,
w i l l wrote:include() brings in another PHP file rather than requesting another page.> I am trying to execute a perl CGI from within a PHP script. I have
> tried the following notation without success.
>
> <?php include("http://" . $_SERVER['SERVER_NAME'] .
> "/somedir/afile.cgi"); ?>
>
> The CGI works on it's own without problems. Is this a limitation of
> PHP?
Under Apache you can use virtual("/somedir/afile.cgi"); to execute a
subrequest.
If you're not using Apache, but have URL wrapper turned on, you can use:
$fd = fopen("http://" . $_SERVER['SERVER_NAME'] . "/somedir/afile.cgi",
"r");
fpassthru($fd);
Or as someone else has suggested, you could run it directly using the
system execution functions if the script is on the same machine.
Regards,
Luke
Luke Ross Guest



Reply With Quote

