On Wednesday 12 November 2003 17:21, Mario Ohnewald wrote: > > $var=shell_exec("/usr/local/bin/mplayer -identify -frames 0 > > /tmp/pitstop.mpeg 2>/dev/null | grep ID_LENGTH | cut -d \"=\" -f 2"); > > $var=shell_exec("/usr/local/bin/mplayer -identify -frames 0 > /tmp/pitstop.mpeg 2>/dev/null | grep ID_LENGTH | cut -d \"=\" -f 2"); > echo "Output: $var"; > > Still gives nothing back :/ > Told you, its not that easy :P
Have you: 1) Turned on full error reporting? 2) Checked that (i) you're not running in safe_mode, or (ii) if you are, that you are allowed to access those executables? 3) Confirmed that the left side of the pipe is working and giving the expected output? 4) Tried giving the full path to grep? If you're still having trouble with it you can try sticking the above into a little shell script and shell_exec() the shell script instead. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Due to lack of disk space, this fortune database has been discontinued. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php