title: How to install ssh2 for php 7.3
body: <p>When trying to install the extension ssh2 via pecl, I encounter the below error messages. I was using a docker container based on <code>php:7.3.2-fpm</code></p>
  
  <p><strong>Steps to reproduce:</strong></p>
  
  <ul>
  <li>Install PHP 7.3.2</li>
  <li>Install the packages <code>libssh2-1-dev</code> and <code>libssh2-1</code></li>
  <li>Try to install the ssh2 extension via <code>pecl install ssh2-1.1.2</code></li>
  </ul>
  
  <p><strong>So how can I successfully install the <code>ssh2</code> extension?</strong></p>
  
  <pre><code>...
  
  /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_tunnel':
  /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1265:42: error: invalid operands to binary == (have 'zend_string {aka struct _zend_string}' and 'int')
    if (resource-&gt;path &amp;&amp; resource-&gt;path[0] == '/') {
                          ~~~~~~~~~~~~~~~~~ ^~
  /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1268:8: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     host = resource-&gt;path + 1;
          ^
  Makefile:196: recipe for target 'ssh2_fopen_wrappers.lo' failed
  make: *** [ssh2_fopen_wrappers.lo] Error 1
  ERROR: `make' failed
  </code></pre>
  
  <p>I found <a href="https://superuser.com/questions/1463391/makefile196-recipe-for-target-ssh2-fopen-wrappers-lo-failed">this question</a> unanswered and put on hold on superusers when I first googled for it. I think its more suited here.</p>