Script doesn't run

Hi Guys,

I hope you can help me.
I am trying to run a script, but somehow it doesn’t work.

php /path_to_directory/video_processing_scripts/get_video_thumbnail.php >>/dev/null &

When I run it in Terminal, it shows me

[8] 10861

[7]+ Stopped

and doesn’t work. It somehow only works if I leave the & and run

php /path_to_directory/video_processing_scripts/get_video_thumbnail.php >>/dev/null

But I definatly need to background the script.

Thanks in advance

Dominik

This is often because the program tries to read stdin and you have still it connected to your interactive session. Try diverting stdin from /dev/null as well.

php /path_to_directory/video_processing_scripts/get_video_thumbnail.php < /dev/null > /dev/null &

BTW, you don’t need >> /dev/null since there is nothing in /dev/null to append to, by definition. Or equivalently a seek to EOF of /dev/null is a no-op.

Hi,
thank you for your reply. It somehow still doesn’t work.
It is very strange. It worked perfectly just a few days ago. I want this script to run, when I visit a Website.
It executes the other php file.
<?php
exec(“php /absolute_path_to_file/test.php”);
?>

if this test.php is smth like:
<?php
exec (“rm /absolute_path_to_file/video.flv”);
?>
It works perfectly, but as soon as I try to get a thumbnail using ffmpeg, it fails. But if I use the same commant in Terminal it works again.

I really don’t know why. I was setting the permissions of the directory to 775 and the owner to wwwrun:www

Thanks in advance

Hi,

I found out, that it was a permissions issue. I had make a copy of ffmpeg in /usr/bin/ and set the fileowner to wwwrun:www

Thank you for your help anyway