Topic: Pecl-ssh2 with PHP 8.2.5
After upgrading from PHP 8.2.2 to the latest PHP 8.2.5 repo on Amazon Linux 2 - I get an issue with ssh2.so, with php82-php-pecl-ssh2 installed
[ec2-user@ip-... ~]$ php -i | grep "ssh"
Warning: PHP Startup: Unable to load dynamic library 'ssh2.so' (tried: /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so (/opt/remi/php82/root/usr/lib64/php/modules/ssh2.so: undefined symbol: libssh2_userauth_publickey_frommemory), /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so.so (/opt/remi/php82/root/usr/lib64/php/modules/ssh2.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
/etc/opt/remi/php82/php.d/40-ssh2.ini
libSSH Version => libssh2/1.4.3
The ssh2.so file exists:
[ec2-user@ip-... ~]$ ls /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so -la
-rwxr-xr-x 1 root root 89408 Apr 21 05:36 /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so
If I revert that individual file to an earlier version, then PHP runs without a warning
Using the version that shipped with PHP 8.2.2 (ignore the file date - that's just today's date):
[ec2-user@ip-... ~]$ ls /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so -la
-rwxr-xr-x 1 root root 89296 May 2 08:22 /opt/remi/php82/root/usr/lib64/php/modules/ssh2.so
[ec2-user@ip-... ~]$ php -v
PHP 8.2.5 (cli) (built: Apr 11 2023 16:16:23) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies
[ec2-user@ip-... ~]$ php -i | grep "ssh"
/etc/opt/remi/php82/php.d/40-ssh2.ini
Registered PHP Streams => ht_tps, ftps, compress.zlib, php, file, glob, data, ht_tp, ftp, compress.bzip2, phar, zip, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp
libSSH Version => libssh2/1.4.3
ssh2
libssh2 version => 1.10.0
banner => SSH-2.0-libssh2_1.10.0
I've experienced the same issue on 4 servers I've put this on so far.
Please can you confirm if you can reproduce the same issue, and if it's perhaps resolved in 8.2.6?
Thanks! (I put underscores in ht_tp because the forum code was complaining about having links in...)