File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -194,23 +194,22 @@ function getDataFromUrl($url) {
194194echo '<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 {
201202echo '<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 $? ' );
205206if (empty ($ ffmpeg )) {
206207echo '<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 ;
214213echo "</pre> " ;
215214}
216215} else {
You can’t perform that action at this time.
0 commit comments