Re: exec() sytem() problem with starting ext. prg
| From: | Miguel Cruz | Date: | Mon, 20 May 2002 21:06:29 +0000 |
| Subject: | Re: exec() sytem() problem with starting ext. prg | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98528@lists.php.net to get a copy of this message | ||
Have you checked is_readable() on the full pathname of the file? Perhaps
one of the parent directories isn't accessible to the web server.
miguel
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
>
>
>
>