Re: exec returns no output?
| From: | Nick Wilson | Date: | Sat, 30 Sep 2006 14:33:28 +0000 |
| Subject: | Re: exec returns no output? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242426@lists.php.net to get a copy of this message | ||
* and then Ray Hauge declared....
> On Saturday 30 September 2006 7:22 am, Nick Wilson wrote:
> > hi all,
> >
> > i've searched and racked my brains, checked config files and all sorts
> > but cannot work out why the following command would give me an empty
> > array (and certainly not actually perform the requested command...)
> >
> > exec('scp -v -i /id_dsa file.txt user@server.com:/target/dir/', $argh);
> > print_r($argh);
> >
> > I can only surmise there is some setting todo with ssh/scp that im
> > unaware of?
> >
> > any ideas welcomed, thanks!
> > --
> > Nick Wilson
> > http://performancing.com/user/1
>
> Do you use generated keys without a password for logging in? Otherwise exec()
> is just going to sit there while the scp command waits for a password.
Tha'ts exactly what i think it's doing. The -i specifies an identity
file according to the man page for scp so i would have hoped that would
take care of it (as i cant work out how to generate an identity for the
apache user itself) but i guess it is doing exactly as you say..
--
Nick Wilson
http://performancing.com/user/1