Re: Re: system, exec, shell_exec, passthru
| From: | p dot willis at telus dot net | Date: | Mon, 14 Aug 2006 17:56:48 +0000 |
| Subject: | Re: Re: system, exec, shell_exec, passthru | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-240647@lists.php.net to get a copy of this message | ||
Yes, that is a similar problem and sounds very much like
what I am experiencing.
Peter
Quoting Michael Jonsson <micke@lmpnet.se>:
> 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/webpasswd";
> $user=$_POST[name];
> $passwd="$passwdexe $user 123456";
> echo $passwd;
> $result = system($passwd);
>
> Resultat from the web, "sudo /usr/sbin/webpasswd billy 12345678"
> and from the error_log, "couldn't read file "./usr/sbin/webpasswd.": no
> such file or directory".
>
> .Mike