Include Perl file in PHP on Apache
Posted: Sat Jan 22, 2005 9:21 am
I can include a Perl script on Apache 2.0.50, PHP 4.3.8 on Windows XP.
The script runs perfect with this code
(Page and somescript.pl are in the same directory)
However, on Unix, Apache 1.3.29, PHP 4.3.10 I get an error
Warning: virtual(): Unable to include
'/usr/www/users/path_to_somescript.pl' - request execution failed in line
nr...
pointing to this line in the script above :
Inclusion of a plain text file works fine, so there seems to be no trouble
with the include in itself.
somescript.pl runs fine in Perl mode, so no problem there.
I tried to use
as well, to no avail.
Any advice to solve this problem for the Apache server on Unix?
Any help most welcome, thanks for your attention.
The script runs perfect with this code
Code: Select all
<?php
if ($_GET) {
$pl = "";
foreach($_GET as $key => $val){
if (! $pl=="" ) $pl = $pl . "&";
$pl .= "$key=$val";
}
virtual ("somescript.pl?$pl");
} else
virtual ("somescript.pl");
?>However, on Unix, Apache 1.3.29, PHP 4.3.10 I get an error
Warning: virtual(): Unable to include
'/usr/www/users/path_to_somescript.pl' - request execution failed in line
nr...
pointing to this line in the script above :
Code: Select all
virtual ("somescript.pl");with the include in itself.
somescript.pl runs fine in Perl mode, so no problem there.
I tried to use
Code: Select all
virtual ("'/usr/www/users/path_to_somescript.pl?$pl");
} else
virtual ("'/usr/www/users/path_to_somescript.pl");Any advice to solve this problem for the Apache server on Unix?
Any help most welcome, thanks for your attention.