I ran into a problem with the exec command in php. I am trying to run a package (ffmpeg.exe) using the exec command in php, but my PHP script works successfully on alternative starts, i.e. the first start is fine, the second start gives an internal server 500 error, then the third start is successful, but the fourth run this error. I'm going crazy about this but can't figure out if there is his fastCGI error or php error. Details of my environment: OS - Windows 7 Home Premium Service Pack 1; IIS Version 7.5.7600; php version 5.3.28
My php script is very trivial: -
echo "hello";
echo '</br>';
$cmd_to_execute = 'ffmpeg.exe -f concat -i list.txt -c copy output.mp4 -y';
echo $cmd_to_execute;
echo '</br>';
$f = exec($cmd_to_execute,$a,$b);
var_dump($a);
var_dump($b);
var_dump($f);
echo "finished";
? >
when it starts successfully: the result it generates:
hello
ffmpeg.exe -f concat -i list.txt -c copy output.mp4 -y
array(0) { } int(0) string(0) "" finished
When a page crashes, the following information is displayed:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP53_via_FastCGI
Error Code 0x800703e3
- , . , . , .