Page 1 of 1
[NOT SOLVED] exec not operating at all...?
Posted: Thu Mar 30, 2006 2:55 pm
by phice
Basically I'm trying to run ffmpeg inside exec() to take a screenshot of a video, read the saved file and out it to the browser.
I've got the command made up that works just find in ssh with root access, but when I try it within exec nothing happens. Nothing displays, no file is saved like it normally is through the command line, etc.
Why do you think this is? Do I need to enable something? Or CHMOD a directory or something?
Many thanks in advance.
Posted: Thu Mar 30, 2006 3:50 pm
by feyd
Yeah, it may be a permissions thing. That's roughly what it was (that I remember) when I had a similar problem -- different program, but same sort of thing.
Posted: Thu Mar 30, 2006 6:02 pm
by phice
Permissions with what? PHP itself? ffmpeg? The directory that it's accessing and/or writing to?
Don
Posted: Thu Mar 30, 2006 6:07 pm
by feyd
all of the above.

Posted: Thu Mar 30, 2006 6:43 pm
by phice
What would I set each one to?

Posted: Thu Mar 30, 2006 7:26 pm
by infolock
I ran into this problem myself. However I was calling a bash script that contained pipes in it's own call to another script
caused php to bomb. could be the same thing for you, could not. just a thought though.
Posted: Fri Mar 31, 2006 1:13 pm
by phice
Any help with what I should CHMOD guys? And to what? Probably 0777 eh?
Posted: Fri Mar 31, 2006 1:19 pm
by feyd
I think it all really depends on who owns each or what groups each is. If they are all different, and you can't chown or chgrp them, 0777 is the most open (although fairly dangerous)
Posted: Fri Mar 31, 2006 1:22 pm
by phice
What should I CHMOD is really all I need to know (I think).
Should it be the folder that it's writing the screenshot to? The folder ffmpeg is grabbing the videos to? The PHP application itself (if I can find it)? FFMPEG (and it's entire folder?)?
Thanks, Don
Posted: Fri Mar 31, 2006 1:29 pm
by feyd
php needs execution rights for ffmpeg; ffmpeg may need rights to write to the destination and read rights for the source (although it may run under php's rights, in which case php would need those); and php will need reading rights for the destination folder (at least.)
It's been a while since I had to fiddle with permissions like this so I could be completely off in space.
Posted: Fri Mar 31, 2006 1:34 pm
by phice
Just so I don't goof anything up, how would I go about chmoding these applications? Just do something like "chmod 0777 /usr/local/ffmpeg/ffmpeg" ?
Posted: Tue Apr 04, 2006 9:20 pm
by infolock
should probably use 775 instead of 777 imo. maybe even 666..
Posted: Tue Apr 04, 2006 10:59 pm
by phice
Anything that works would be fine with me.