I'm trying to run a Perl script using:

$var = null;
system(PATH_PERL . 'script.pl', $var);
var_dump($var);

However, I'm getting this error:

Warning: system() has been disabled for security reasons [...]

The complete list of disabled functions (with ini_get('disable_functions')):

system, system_exec, shell, shell_exec, exec, passthru, escapeshellarg, escapeshellcmd, proc_close, proc_open, ini_alter, popen, show_source, enable _dl, dl

Is there any way to execute a Perl script when these functions are disabled?

有帮助吗?

解决方案

There is no way to execute them by shell; all ways to execute shell commands in PHP are disabled. (execpt interpreting perl in PHP (what makes no sense I think...; then you also can directly translate perl to php))

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top