shell_exec with pipes
| From: | Mario Ohnewald | Date: | Tue, 11 Nov 2003 16:17:34 +0000 |
| Subject: | shell_exec with pipes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169181@lists.php.net to get a copy of this message | ||
Hello List!
I have tried to get this command working with php for about 2Weeks now, and
i would like you to try to get this thing working.
This shell command:
/usr/local/bin/mplayer -identify -frames 0 /tmp/pitstop.mpeg 2>/dev/null|
grep ID_LENGTH | cut -d "=" -f 2
gives me the result "16" back, the LENGHT of the filename.
$var=shell_exec("/usr/local/bin/mplayer -identify -frames 0
/tmp/pitstop.mpeg 2>/dev/null| grep ID_LENGTH | cut -d "=" -f 2");
just wont for some reason! $var ist just empty.
I was playing around with stderr and stdout and stuff, but i dont know why
php wont deal with it as shell does.
$var=shell_exec("ls -al");
for examle works just fine!
Could someone please give it a try, cause i have spent hours in irc channels
and googeling around to get this solved :/
Thanks a LOT!!
Mario
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++