Re: system command runs application, but application doesn't work correctly

From: Date: Thu, 17 Jan 2008 12:46:58 +0000
Subject: Re: system command runs application, but application doesn't work correctly
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-267493@lists.php.net to get a copy of this message
Daniel Brown <parasane <at> gmail.com> writes: > Try replacing system() with die() and letting it print out the > information full command string. That may give you an idea of a > variable that's either incorrect or undefined. If you copy and paste > it and run the command from the command line and it works, then it may > be permissions issues. Daniel, This doesn't display anything: die($first); die($second); Full commands are: first: /usr/local/bin/mencoder -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=1 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o /home/re/video/2/16.flv /home/re/ff/logo7.avi /home/re/video/2/16temp second: /usr/local/bin/mencoder -vf scale=448:-3,expand=448:336 -sws 9 -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=1 -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o /home/re/video/2/16.flv /home/re/ff/logo7.avi /home/re/video/2/16temp I've set permissions of all test files and directories to 777. But still my script doesn't work. > > One part of the snipped content that I noticed kept repeating is > the following (and actually ending with this line): > 'VDecoder init failed :( Read DOCS/HTML/en/codecs.html' > > Did you follow the advice and read that document? Yes. It's just describes codecs. But I know mencoder support those codecs, because it encodes videos when it's called from SSH. > Beyond that, it's a question that should probably instead be asked > on a mencoder mailing list, since PHP's system() function is working > correctly, but apparently isn't getting the information it needs to > pass stuff back-and-forth with the system. > I've already asked this question in Mencoder group, by noone replied. I thinkit's because mencoder works fine and it doesn't work only when I call it from PHP. The thing is when I copy/paste commands above to SSH, everything works fine. Do you have any thoughts?

« previous php.general (#267493) next »