On Thu, 2005-06-30 at 10:47, Bob Winter wrote:
Brian,
Is /www/files/services/ the correct relative path?? You could
try using the absolute path to see if it fixes the problem.
Also, and maybe more significant, I use tcsh . . . if you use bash
this could be the conflict. I see that
On Wed, 29 Jun 2005, Bob Winter wrote:
Brian,
The script works for me, I should have included the screen
input/output, which now follows:
Hmmm, this simply does not work for me. Maybe something with my version of
php or ssh.. I'm at a loss..
$ php -v
PHP 4.3.5 (cli) (built: Apr 30 2004
Brian,
Is /www/files/services/ the correct relative path?? You could
try using the absolute path to see if it fixes the problem.
Also, and maybe more significant, I use tcsh . . . if you use bash
this could be the conflict. I see that the echo of the $cmd string
from PHP is missing the
On Tue, 28 Jun 2005, Bob Winter wrote:
Brian,
The format of your string that works for me is :
$cmd = scp [EMAIL PROTECTED]:$directory/\{$files\} $tmp_dir;
$files must be a comma separated string with NO SPACES.
Here is my complete test script for your review:
START =
Brian V Bonini wrote:
I tried that too. I get '/{a,s,d,f\}' in the string if I use it that way.
Are you saying that you were able to do a succesful transfer using the
above? I can output a string that SHOULD work, e.g. scp
[EMAIL PROTECTED]:/dir/{file1,file2,file3} /dir/. but when run from
On Mon, 2005-06-27 at 20:51, Jasper Bryant-Greene wrote:
Brian V Bonini wrote:
I can echo out the command and get a well formed command, i.e.
one that will execute from a command prompt, but when I try to
exec() $cmd from within the script the globbing is taken
literally.
Try
On Mon, 2005-06-27 at 22:04, Bob Winter wrote:
Brian,
Can you post more of the script?
Sure. I also tried {{$files}} and tried calling a shell exclusively like:
sh -s 'scp [EMAIL PROTECTED]'
Anyway, here's more for the code surrounding the area in question, it's a
little hacked up ATM
but
Brian,
The format of your string that works for me is :
$cmd = scp [EMAIL PROTECTED]:$directory/\{$files\} $tmp_dir;
$files must be a comma separated string with NO SPACES.
Here is my complete test script for your review:
START =
#!/usr/bin/php
?php
$file1 = 'file_A';
$file2 =
Can not make this work inside a php script.
Have tried several variations:
$cmd = scp [EMAIL PROTECTED]:$directory/\{$files} $tmp_dir/.;
$cmd = scp [EMAIL PROTECTED]:$directory/ . '{' . $files . '} ' . $tmp_dir/.;
etc...
I can echo out the command and get a well formed command, i.e. one that
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' .
$files . '} ' . $tmp_dir . '/';
That should work
On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can not make this work inside a php script.
Have tried several variations:
$cmd = scp [EMAIL
On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote:
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' .
$files . '} ' . $tmp_dir . '/';
That should work
On 6/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can not make this work inside a php script.
Have tried
Brian V Bonini wrote:
I can echo out the command and get a well formed command, i.e.
one that will execute from a command prompt, but when I try to
exec() $cmd from within the script the globbing is taken
literally.
Try shell_exec(). I don't think exec() goes via the shell.
--
PHP General
Brian,
Can you post more of the script?
--Bob
Brian V Bonini wrote:
On Mon, 27 Jun 2005, [ISO-8859-1] Andr? Medeiros wrote:
$cmd = 'scp ' . $user . '@stagingcws.' . $tld . ':' . $directory/{' .
$files . '} ' . $tmp_dir . '/';
That should work
On 6/27/05, [EMAIL PROTECTED] [EMAIL
13 matches
Mail list logo