Skip to content

Commit d81ba24

Browse files
committed
Update reqcheck.php
1 parent d49c97e commit d81ba24

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

setup/reqcheck.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,22 @@ function getDataFromUrl($url) {
194194
echo '<div class="lillist">'.$aerror.' cUrl test failed.</div>';
195195
$error++;
196196
}
197+
$isShellOk = (is_callable('shell_exec') && false === stripos(ini_get('disable_functions'), 'shell_exec'));
197198

198-
if(function_exists('shell_exec')) {
199+
if($isShellOk) {
199200
echo '<div class="lillist">'.$passed.' shell_exec is enabled.</div>';
200201
} else {
201202
echo '<div class="lillist">'.$aerror.' shell_exec is disabled.</div>';
202203
}
203-
if(function_exists('shell_exec')) {
204-
$ffmpeg = trim(shell_exec('type -P ffmpeg'));
204+
if($isShellOk) {
205+
$ffmpeg =shell_exec('ffmpeg -version 2>&1; echo $?');
205206
if (empty($ffmpeg)) {
206207
echo '<div class="lillist">'.$aerror.' Can\'t find FFMPEG from here.</div>';
207208
} else {
208-
echo '<div class="lillist">'.$passed.' FFMPEG seems to be available as <strong>'.$ffmpeg.'. Required version: 2.5+</strong></div>';
209-
exec($ffmpeg." -h full", $codecArr);
210-
echo "<pre>";
211-
for($ii=0;$ii<count($codecArr);$ii++){
212-
echo $codecArr[$ii].'</br>';
213-
}
209+
echo '<div class="lillist"> FFMPEG required version: 2.5+ </strong></div>';
210+
exec(trim($ffmpeg)." -h full", $codecArr);
211+
echo "<pre style=\"height:60px; overflow:auto\">";
212+
echo $ffmpeg;
214213
echo "</pre>";
215214
}
216215
} else {

0 commit comments

Comments
 (0)