Show sourcecode
The following files exists in this folder. Click to view.
Webserver1/Ovningar/Slutprojekt/DEBUG/
ffmpeg_testing.php
force_verify_timeout.php
reset_session.php
test_upload.php
uploads/
ffmpeg_testing.php
34 lines UTF-8 Windows (CRLF)
<?php
$path = realpath(__DIR__ . "/../../../bin/ffmpeg");
var_dump($path);
var_dump(is_executable($path));
echo is_callable('shell_exec');
if (is_file($path)) {
echo "Path exists!";
}
else {
echo "incorrect path!";
}
echo "<br>";
print_r(is_callable('exec'));
echo PHP_OS . "<br>";
echo php_uname();
echo "<pre>";
echo shell_exec("which ffmpeg 2>&1");
echo shell_exec("ls 2>&1");
// $output = shell_exec("$path -version 2>&1");
// $output = shell_exec("whoami 2>&1");
// print_r($output);
$output = shell_exec("\"$path\" -version 2>&1; echo Exit:$?");
var_dump($output);
echo "</pre>";
// if ($output) {
// echo "FFmpeg är inte installerat. Be administratören installera det.";
// }
// else {
// echo "FFmpeg är installerat!";
// }
?>