title: php sftp seg fault
body: <p>What i need to do if next code gives me seg fault ?</p>
  
  <pre><code>    $handle = opendir("ssh2.sftp://$sftp".'/usr/bin/');
      $file = readdir($handle);
      closedir($handle);
  </code></pre>
  
  <p>where $sftp is </p>
  
  <pre><code>    $this-&gt;_connection = ssh2_connect($this-&gt;_server, 22);
      if($this-&gt;_authType==ExportInterface::CONN_AUTH_KEY) {
          ssh2_auth_pubkey_file($this-&gt;_connection,$this-&gt;_user,$this-&gt;_key,$this-&gt;_privateKey);
      } else {
          ssh2_auth_password($this-&gt;_connection,$this-&gt;_user,$this-&gt;_password);
      }
      $sftp = ssh2_sftp($this-&gt;_connection);
  </code></pre>
  
  <p>Connect work well. and segfault is when only i use readdir function. </p>