php running from command line but not from browser

Discussion in 'PHP' started by gg11, Nov 28, 2007.

  1. #1
    Hi,

    I'm having problem with starting mplayer from browser. I would like to start mplayer from web page. My script works fine if i run it from command line with php -a -f script.php, but when i run it from browser it doesn't do anything. The code in script is:

    $descriptorspec = array(0 => array("pipe", "r"),
    1 => array("pipe", "w"),
    2 => array("file", "./error-output.txt", "a"));
    $process = proc_open('mplayer -slave -idle -input file=/home/bitnet/.mplayer/pipe &', $descriptorspec, $pipes);
     
    gg11, Nov 28, 2007 IP