Вопрос

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