<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Use streams for ssh2 driver in VFS</title> 
  <pubDate>Thu, 09 Apr 2026 17:31:32 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8323</link> 
  <atom:link rel="self" type="application/rss+xml" title="Use streams for ssh2 driver in VFS" href="https://bugs.horde.org/ticket/8323/rss" /> 
  <description>Use streams for ssh2 driver in VFS</description> 
 
   
   
  <item> 
   <title>I hope I&#039;m posting this in the right queue.



It looks like</title> 
   <description>I hope I&#039;m posting this in the right queue.



It looks like the ssh2_scp_* php functions do not work on some systems. See http://phpbuilder.com/board/showthread.php?t=10352595 and http://forums.devnetwork.net/viewtopic.php?t=80343 for that matter. My system is one of those - everything (!) except uploading and downloading/editing files with Gollem over the SSH2 backend works.



However, there is a workaround using the php fopen wrappers. I wrote a quick and dirty hack using this workaround - see the attached diff file for ssh2.php.</description> 
   <pubDate>Thu, 04 Jun 2009 21:21:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54426</link> 
  </item> 
   
  <item> 
   <title>Sorry, posted the wrong diff. Here&#039;s the right one.</title> 
   <description>Sorry, posted the wrong diff. Here&#039;s the right one.</description> 
   <pubDate>Thu, 04 Jun 2009 22:21:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54427</link> 
  </item> 
   
  <item> 
   <title>If you are already using streams, why do you read the comple</title> 
   <description>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&#039; 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&#039;t exist (PHP 5 only).</description> 
   <pubDate>Fri, 05 Jun 2009 07:19:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54433</link> 
  </item> 
   
  <item> 
   <title>&gt; If you are already using streams, why do you read the comp</title> 
   <description>&gt; If you are already using streams, why do you read the complete file 

&gt; contents into memory instead of using copy()? You could even replace 

&gt; VFS&#039; copy and move functionality completely by the native PHP calls.

&gt; Also, please review your patch reading the Horde coding standards 

&gt; (single quotes, lowercase keywords). And if you want the patch to 

&gt; also be applied to the stable branch, you need a fallback if 

&gt; file_put_contents() doesn&#039;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&#039;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&#039;t touch them.

I also tried to adapt my code to comply with the Horde coding standards.</description> 
   <pubDate>Sat, 06 Jun 2009 17:13:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54444</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/VFS/lib/VFS/ssh2.php?rt=horde&amp;r1=1.12&amp;r2=1.13&amp;ty=u
http://cvs.horde.org/diff.php/framework/VFS/package.xml?rt=horde&amp;r1=1.90&amp;r2=1.91&amp;ty=u</description> 
   <pubDate>Mon, 15 Jun 2009 14:17:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54572</link> 
  </item> 
   
  <item> 
   <title>Committed to HEAD and 3.3.5 - thanks!</title> 
   <description>Committed to HEAD and 3.3.5 - thanks!</description> 
   <pubDate>Mon, 15 Jun 2009 14:20:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8323#t54573</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
