Forum Moderators: coopster
So, are there any good substitutes? I know I can use include() and use the full http address of the file I want to use, but according to some posts around here, that's much slower than using the file system and I guess it clutters up server logs unnecessarily. So I'd rather not use that method. And obviously, using a relative path with include() just pulls in the Perl code itself instead of the output.
Any ideas will be appreciated.
Thanks in advance,
Matthew
// Code to replace virtual() call
putenv('REQUEST_METHOD=GET');
putenv('QUERY_STRING=whatever');
passthru('/full/path/to/perl/script.cgi');
exec('/full/path/to/perl/script.cgi', $output);
array_shift($output); // remove first line
echo(join('', $output)); // output contents
The result of both of those is a Perl "Software Error" message, giving details about being unable to find a file that is included in the Perl script like this:
[B]use ABC::StandardModule;[/B]. I don't know anything about Perl, but I'm guessing that's the equivalent of require() in PHP. At any rate, I can go directly to the Perl script with my browser and it gives me the HTML output, but trying to get it into this PHP script is failing. Just an update - all ideas will still be most welcome! ;)
Thanks again,
Matthew