[PHP] system, exec, shell_exec, passthru [RESOLVED]

2006-08-15 Thread p . willis
Hello, This problem has now been resolved. The problem as described below was NOT caused by PHP. The problem was actually a file permissions/ownership problem. A.) The apache webserver runs as a user with specific priviledges. On this particular server the webserver runs as user 'apache'. B.) Th

Re: [PHP] Re: system, exec, shell_exec, passthru

2006-08-14 Thread p . willis
Quoting Adam Zey <[EMAIL PROTECTED]>: > > Looking at your $command, there is no path in front of it. It's likely > that PHP's shell doesn't have the program in its PATH. Try manually > specifying the full path to the command: > > $command="/home/peter/myprog $arg1 $arg2 > textfile.txt"; > > (

Re: [PHP] Re: system, exec, shell_exec, passthru

2006-08-14 Thread p . willis
Yes, that is a similar problem and sounds very much like what I am experiencing. Peter Quoting Michael Jonsson <[EMAIL PROTECTED]>: > Hi, > > I can run any external program like ls, cp, uptime... > But if a try to run my shell script a get error. > > $passwdexe = "sudo /usr/bin/webpa

[PHP] system, exec, shell_exec, passthru

2006-08-14 Thread p . willis
Hello, I am trying the run an external application with command line arguments using PHP under linux. ie: $command="myprog $arg1 $arg2 > textfile.txt"; system("echo \"$command\" > test.txt"); system($command); $handle=fopen("textfile.txt","r"); if($handle!=NULL) { while(!feof($handle))