am using fuelphp to convert some video files, in my controller i use "exec" to start ffmpeg processing.
the first step i create thumbs, and retrieve video info with no problems, using exec and ffmpeg but when i launch the conversion task using exec("FUEL_ENV=production /usr/local/php53/bin/php -q ".APPPATH."oil refine videos:convert $vid"); it ignore the command, and nothing is converted!
it happen only in remote linux host. on my local windows everthing is working fine!! with a little change for the command exec("start php ".APPPATH."oil refine videos:convert $vid");
I've redirected the output using "$command > output.txt 2>&1", in the file i found the json response of the controller instead of the exec output ... so am out of idea!!!
i've moved the oil script and configured it to work inside the application path!! so it works in local machine and when i run the full command from the shell
I don't use exec() myself, so I can't help you on this, but I know on some linux flavours you need to use "env FUEL_ENV=production...", perhaps this is the case here?
i got the same issue with env, also i tried popen and shell_exec to execute the command, but it fail too , and there is no error! so i've changed the oil script permissions to 777 and nothing happens... the generated command works fine on shell...
I've also created a new action in the controller, with only the command to execute ... still blocked with the same issue... so i will try to run a standard php file to catch this issue.
Are you sure it's available on your server? Some hosting companies cripple their PHP installation with the rediculous idea that it would make their environment safer...
yes, i used it to create thumbnails directly with the ffmpeg, i've tried exec , and popen and no error or warning returned, so i switched to "system" and got a warning "Unable to fork [env HTTP_FUEL_ENV=production .... "
"Warning: exec() [function.exec]: Unable to fork [env HTTP_FUEL_ENV=production /usr/local/php53/bin/php /path/to/oil -v] in /path/to/public_html/test.php on line 2
the company hosting still give no response for my ticket, :\
I see a lot of reports of this issue from Windows users, but not from linux users.
It could be that the user apache runs under doesn't have shell access on your server (which would be logical in a hosted environment), in which case it will never work. But you'll have to wait for the reply from your hosting company.