title: Running SVN commands from PHP using exec, shell_exec, or system
body: <p>I have a very simple piece of code which should theoretically get me a svn list from php</p>
  
  <pre><code>&lt;?php
  print_r("Method 1&lt;br/&gt;");
  $x = exec("/usr/bin/svn list svn+ssh://svn.server.com/path/to/trunk/ 2&gt;&amp;1", $o, $m);
  print_r($o);
  
  print_r("&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;");
  
  print_r("Method 2&lt;br/&gt;");
  $x = exec("/usr/bin/svn list --username user --password pass svn+ssh://svn.server.com/path/to/trunk/ 2&gt;&amp;1", $o, $m);
  print_r($o);
  ?&gt;
  </code></pre>
  
  <p>Both these methods return following errors</p>
  
  <pre><code>Method 1
  Array ( [0] =&gt; svn: warning: Can't open file '/root/.subversion/servers': Permission denied [1] =&gt; No protocol specified [2] =&gt; [3] =&gt; (gnome-ssh-askpass:6062): Gtk-WARNING **: cannot open display: :0.0 [4] =&gt; svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. [5] =&gt; svn: Network connection closed unexpectedly ) 
  
  
  Method 2
  Array ( [0] =&gt; svn: warning: Can't open file '/root/.subversion/servers': Permission denied [1] =&gt; No protocol specified [2] =&gt; [3] =&gt; (gnome-ssh-askpass:6062): Gtk-WARNING **: cannot open display: :0.0 [4] =&gt; svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. [5] =&gt; svn: Network connection closed unexpectedly [6] =&gt; svn: warning: Can't open file '/root/.subversion/servers': Permission denied [7] =&gt; No protocol specified [8] =&gt; [9] =&gt; (gnome-ssh-askpass:6066): Gtk-WARNING **: cannot open display: :0.0 [10] =&gt; svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file. [11] =&gt; svn: Network connection closed unexpectedly )
  </code></pre>
  
  <p>I am able to run either of the svn commands from command line just fine, I also have ssh-key based authentication setup to talk to the svn.server.com </p>
  
  <p>All I want to do is get a list of folders from the trunk. our svn is only setup for svn+ssh access. </p>
  
  <p>Any ideas?</p>