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

2008-01-19 Thread Richard Lynch
On Sat, January 19, 2008 11:24 am, Apple wrote: > Richard Lynch l-i-e.com> writes: > >> They also won't have your same environment, e.g., home directory >> $HOME. >> >> Check permissions on all files/directories. >> >> Use complete pathnames from the root hard drive: >> /home/apple/path/to/$

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

2008-01-19 Thread Apple7777
Nathan Nobbe gmail.com> writes: > have you tried a trivial call to mencoder, like i suggested? > it looks like you were passing a lot of parameters to it in the code you > first > posted. try starting out w/ something simple and get that working before > going > for the full blown finished versi

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

2008-01-19 Thread Nathan Nobbe
On Jan 19, 2008 12:24 PM, Apple <[EMAIL PROTECTED]> wrote: > Richard Lynch l-i-e.com> writes: > > > They also won't have your same environment, e.g., home directory $HOME. > > > > Check permissions on all files/directories. > > > > Use complete pathnames from the root hard drive: > > /home/ap

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

2008-01-19 Thread Apple7777
Richard Lynch l-i-e.com> writes: > They also won't have your same environment, e.g., home directory $HOME. > > Check permissions on all files/directories. > > Use complete pathnames from the root hard drive: > /home/apple/path/to/$outputFile I do that. All permissions (files and directories) a

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

2008-01-19 Thread Richard Lynch
On Fri, January 18, 2008 4:49 pm, Apple wrote: > I wonder is it possible to run system() command, so mencoder will run > as from > root (user "500") and not PHP (user "43"). No. system() versus exec() has nothing to do with which user runs it. They only differ in how they handle input/output

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

2008-01-19 Thread Richard Lynch
When you run it from the shell, you are you. When you run it from a PHP web-server, you are not you. You are whatever user is configured in httpd.conf That user will not have the same rights/permissions as you do. They also won't have your same environment, e.g., home directory $HOME. Check pe

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

2008-01-18 Thread Daniel Brown
On Jan 18, 2008 5:49 PM, Apple <[EMAIL PROTECTED]> wrote: > Daniel Brown gmail.com> writes: > > > > > On Jan 17, 2008 6:48 PM, Apple gmail.com> wrote: > > > Another strange thing is I run ImageMajick with system() in a lot > of scripts on > > > the same server and everything works fine. >

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

2008-01-18 Thread Apple7777
Daniel Brown gmail.com> writes: > > On Jan 17, 2008 6:48 PM, Apple gmail.com> wrote: > > Another strange thing is I run ImageMajick with system() in a lot of scripts on > > the same server and everything works fine. > > > > What is the problem? Do you have any idea? > > Does the UID (

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

2008-01-18 Thread Apple7777
Daniel Brown gmail.com> writes: > Does the UID (or at least GID) under which PHP is being executed > have permissions to write to the area you're trying to save the file? > > Similar to above, does it have the correct permissions to read the > incoming file? Daniel, I'm not sure about U

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

2008-01-18 Thread Daniel Brown
On Jan 17, 2008 6:48 PM, Apple <[EMAIL PROTECTED]> wrote: > Another strange thing is I run ImageMajick with system() in a lot of scripts > on > the same server and everything works fine. > > What is the problem? Do you have any idea? Does the UID (or at least GID) under which PHP is being

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

2008-01-17 Thread Apple7777
Richard Lynch l-i-e.com> writes: > > Try writing a 2-line .sh (shell) script that does what you want, and > call that 2-liner from exec(). Thanks for idea, Richard. But it doesn't work. I wrote code as you said: $first = "/usr/local/bin/mencoder -vf scale=448:-3,expand=4

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

2008-01-17 Thread Richard Lynch
Try writing a 2-line .sh (shell) script that does what you want, and call that 2-liner from exec(). On Thu, January 17, 2008 6:46 am, Apple wrote: > Daniel Brown gmail.com> writes: > >> Try replacing system() with die() and letting it print out the >> information full command string. Tha

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

2008-01-17 Thread Apple7777
Daniel Brown 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 wor