On Mon, August 14, 2006 12:25 pm, Michael Jonsson wrote:
> 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";
>
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";
>
> (
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
No, it not on...
safe_mode Off Off
safe_mode_exec_dir no valueno value
safe_mode_gid Off Off
safe_mode_include_dir no valueno value
.M
Adam Zey wrote:
Michael Jonsson wrote:
Hi,
I can run any external program like ls, cp, uptime...
But if a try to run
Michael Jonsson wrote:
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 = s
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);
Resulta
[EMAIL PROTECTED] wrote:
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)
{
7 matches
Mail list logo