|
Posted by Marty Meyers on 12/07/05 14:43
Hi Etienne,
Thanks for the detailed explanation of "2>&1". I should have recognized
that from the windows cmd processor which is about the same.
> > $msg= exec("perl $scriptPath/insert.pl $d $u $t 2>&1", $returnVal);
> > Second problem, this same line of code when run from the unix command
line
> > returns the following error:
> >
> > sh: /perl: No such file or directory
>
> Just checking, are you saying that the
> command works fine with:
> $> perl insert.pl
Marty ans: Yes, it works-with args, ie perl insert.pl 28 2
/var/www/....../vehicles.txt
>
> but that it does not work from neither
> php php_file_containg_exec.php
Marty ans: correct, it fails BTW-the php file is ftpupload.php
>
> nor
>
> $> perl $scriptPath/insert.pl $d $u $t 2>&1
Marty ans: Very interesting, using the $scriptPath in the command line
fails. It starts the script(I have a print statement in it) but it does not
run the entire program.
>
> Did you substitute $scriptPath; $d and $u with
> the relevant values before trying this, or
> exactly what did you do ?
Marty ans: ran it two ways (both from command line, ie php ftpupload.php):
I used variables-failed
I used the real values for all variables and changed the double quotes
to single quotes in the ftpupload.php file-Still failed
Marty ans: Thanks
>
> --
> Etienne Marais
> Cosmic Link
> South Africa
[Back to original message]
|