Re: exec() sytem() problem with starting ext. prg
| From: | Alexander Saupe | Date: | Tue, 21 May 2002 15:05:54 +0000 |
| Subject: | Re: exec() sytem() problem with starting ext. prg | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98563@lists.php.net to get a copy of this message | ||
What is a TTY (see below)?
----- Original Message -----
From: "Rasmus Lerdorf" <rasmus@php.net>
To: "Alexander Saupe" <a.saupe@epvtec.de>
Cc: <php-general@lists.php.net>
Sent: Monday, May 20, 2002 2:06 PM
Subject: Re: [PHP] exec() sytem() problem with starting ext. prg
> su - nobody (substitute your web server user id)
> then try to run the command
>
> The other problem can be that the app requires a TTY.
>
> -Rasmus
>
> On Mon, 20 May 2002, Alexander Saupe wrote:
>
> > Hello php-general,
> >
> > on a LAMP server I have the following problem:
> >
> > 1. playing around I tried to execute the linux df (diskfree) command
with
> > exec() or system() - no problem, works fine!
> > 2. trying to start an application did not work!
> > - the application which I am trying to start can be started by anyone,
here
> > are the user rights: -rwxrwxrwx 1 10575 21129 1052648 M?r 13
16:31
> > mldonkey
> > - the application is normally (from the console, no gui) started like
this:
> > mldonkey > mldonkey.log &
> > - for testing I configured the Apache (in httpd.conf) as a user
> > - doing a little research (http://www.php.net/manual/en/ref.exec.php) I
> > tried this:
> > exec("php script.php parameters 2>dev/null >&- <&-
> > >/dev/null &");
> > Where...
> > ...php is the path to your php script executer (php has to be
specifically
> > complied to be to do this)
> > ...script.php is the script
> > ...parameters are none or more parameters
> > ...2>dev/null redirects the stderr to a file
> > ...<&- switches off the stdin
> > ...>&- switches off the stdout
> > ...>dev/null redirects all other output to the file dev/null
> > ...& direct script to run in background
> > - played a little with the parameters and... nothing happened! ;-(
> >
> > Help me please!
> >
> > Maybe anybody knows, if this has something to do with user rights (I
think
> > not)?
> > What do I have to do, if I want to send e.g. 'kill PID' Linux command
(no
> > success here either)?
> >
> > Thank's a lot, Alex
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>