exec not always working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

exec not always working

Post by GeXus »

I'm using the following code

Code: Select all

exec('ffmpeg -i uploads/videos/original/video7.mpg -an -ss 3 -t 
00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg uploads/videos/original/vids.jpg')
When I run the command from the command line (same user), it works just fine.. but when I run it using exec, it doesnt work properly..

Are there any other settings or anything that can be used with exec that may cause problems?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

capture the output

Code: Select all

exec("command", $output);

echo '<pre>';
print_r($output);
echo '</pre>';
give you anything useful?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply