Re: Re: system, exec, shell_exec, passthru

From: Date: Mon, 14 Aug 2006 17:50:33 +0000
Subject: Re: Re: system, exec, shell_exec, passthru
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-240648@lists.php.net to get a copy of this message
Quoting Adam Zey <azey@nit.ca>: > > 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"; > > (or whatever the path is) > > Keep in mind that under linux, (unlike DOS), you CANNOT execute > applications in the same directory without a path. Even if the program > is in the same directory as your present working directory (which is > usually where the PHP script is located), you'd have to do "./myprog" as > a relative path. > > Regards, Adam Zey. I have actually tried that and it didn't make any difference. In the actual code I have full paths applied to all input and output files. One of the system calls is in the system path. (ie: /usr/bin) Peter

« previous php.general (#240648) next »