go to bug id or search bugs for
The latest release of the ssh2 extension (1.1.2, released in 2017) doesn’t build on PHP 7.3, but it looks like there are commits in the master branch that fix this. I’ve confirmed, and I’m able to build the latest state of master (79371dc) on PHP 7.3.
Please release a new version of the extension for PHP 7.3.
Add a Patch
Add a Pull Request
I've postponed the migration of my dev environment for months after a few attempts because of this,
Thanks to Ramsey, I found the sources that can be compiled for 7.3, just before I give up once again.
P.S., for people looking a solution with a search engine (which I couldn't find myself):
If you're stuck with compiling errors like:
error: invalid operands to binary expression ('zend_string' (aka 'struct _zend_string') and 'int')
warning: incompatible pointer types assigning to 'char *' from 'zend_string *' (aka 'struct _zend_string *')
you will be able to install the ssh2.so extension for PHP7.3 using a recent snapshot of the source code that can be found here:
I could just reproduce:
docker run php:7.3 bash -c "apt-get update && apt-get -y install libssh2-1-dev && pecl install ssh2-1.1.2"
=> Makefile:196: recipe for target 'ssh2_fopen_wrappers.lo' failed
make: *** [ssh2_fopen_wrappers.lo] Error 1
ERROR: `make' failed
The following pull request has been associated:
Patch Name: Remove inline from php_ssh2_sftp_attr2ssb
On GitHub: https://github.com/php/pecl-networking-ssh2/pull/36
ssh2 1.2 is compatible with PHP 7.3+, so this ticket can be
closed. Note that the download link does not work currently,
and that this is not a stable version.