[Tickets #8323] Re: Use streams for ssh2 driver in VFS

bugs at horde.org bugs at horde.org
Sat Jun 6 17:13:51 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8323
------------------------------------------------------------------------------
  Ticket             | 8323
  Updated By         | jives at jives.ixum.net
  Summary            | Use streams for ssh2 driver in VFS
  Queue              | Horde Framework Packages
  Version            | HEAD
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | ssh2.php.patch
------------------------------------------------------------------------------


jives at jives.ixum.net (2009-06-06 13:13) wrote:

> If you are already using streams, why do you read the complete file  
> contents into memory instead of using copy()? You could even replace  
> VFS' copy and move functionality completely by the native PHP calls.
> Also, please review your patch reading the Horde coding standards  
> (single quotes, lowercase keywords). And if you want the patch to  
> also be applied to the stable branch, you need a fallback if  
> file_put_contents() doesn't exist (PHP 5 only).

You are obviously right - there is no need to read the file into  
memory. As for the replacement of the VFS functions: I don't know if  
using the native PHP functions is better or worse in terms of  
compatibility and performance. Because of that and since the  
ssh2_sftp_*-functions which are used for copying and moving files seem  
to work on any system (in contrast to the ssh2_scp_*-functions), I  
didn't touch them.
I also tried to adapt my code to comply with the Horde coding standards.






More information about the bugs mailing list