문제

I have problem with script that running screen session.

<?php  exec("screen -m -d ffmpeg2theora -v 3 /path/to/video.mp4");  ?>

and see this on logs:

Wed Oct 17 16:17:39 2012] [error] [client 83.5.x.x] sh: 1: screen: not found, referer: http://xxxxxx.xx

It's stop working on some update (apache/php/suphp?), before that was working like charm Any idea's what's happend, how configure suPhp/Apache?

도움이 되었습니까?

해결책

If you want PHP to start a long-running command in the background, why not try the following:

<?php pclose(popen("/usr/bin/nohup /path/to/ffmpeg2theora -v 3 /path/to/video.mp4 >/tmp/result 2>&1", "r")); ?>

It's always wise to use explicit paths to commands in these sorts of situations.

다른 팁

Instead, simply do:

exec("ffmpeg2theora -v 3 /path/to/video.mp4 &");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top