Re: can't get output of exec ('nice -n 19 ffmpeg -i "file"')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bingo, this fixed it :)

thx (all) for answering so quickly :)

Daniel Brown wrote:
    Try this instead, just to make sure everything's running as expected:

<?php
 $cmd = 'nice -n 19 ffmpeg -i "'.$sourcePath.'" 2>&1';
 exec($cmd,$ret,$err);
 print_r($ret);
?>

    $ret (or whatever you name the second parameter of exec()) will
always be an array, regardless of the actual output from the command.

    You'll need to be sure you have shell access and the ability to
execute system commands as whatever user the PHP script is running
(your own user, apache, httpd, nobody, daemon, pscln, etc.).

    Redirecting the error channel to stdout (using the 2>&1 redirect
at the tail of the command) will also give you the full program
response on $ret, which is then dumped in full using print_r() as
shown above.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux