I assume it is passthrudisabled in the file php.inithat is used for the web server for security reasons. Try the following code:
function passthru_enabled() {
$disabled = explode(', ', ini_get('disable_functions'));
return !in_array('exec', $disabled);
}
if (passthru_enabled()) {
echo "passthru is enabled";
} else {
echo "passthru is disabled";
}
If it is disabled, you cannot do anything if you cannot edit the php.ini file.
: , , - , . :
error_reporting(-1);
ini_set('display_errors', 'On');
Edit:
passthru , , , , PHP, , . , escapeshellarg.
$url = escapeshellarg('http://codante.org/linux-php-screenshot');
$command = "./wkhtmltoimage --width 164 --height 105 --quality 100 --zoom 0.2 $url file/test.jpg";
passthru, . , , .
passthru($command, $status);
if ($status != 0) {
echo "There was an error executing the command. Died with exit code: $status";
}
, , .