Re: Hoping for a working example of SFTP in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I will come out of my lurking place to comment…

I think the problem here is that the copy function is designed (like scp and other remote transfer tools) to work with either side of the copy being the local path, so a filename without a colon is taken to be a local path (and that doesn’t exist in your case). The drawback of that approach is that it allows *both* sides of the copy to be a local path, which effectively becomes the same as a Unix ‘cp’ or a DOS ‘copy’ command. It’s not considered an error: it *might* be what was intended…

Pete 

> On 8 Feb 2021, at 15:51, David Spector <david025@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> Eric, Yes, that was it! Fixing this made 'copy' work.
> 
> So, PHP maintainers: why didn't the error message say that the colon was missing, or include a description of correct wrapper syntax? All it says is "failed to open stream", not even "syntax error in stream protocol". I would fix the error message myself if I could.
> 
> Thanks, Eric, for your sustained help in getting both parts of this example working. You are a great human being and an inspiration.
> 
> When I have time, I will clean up the examples and post them wherever people are having trouble using PHP to upload files using SFTP.
> 
> David




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux