Solved How to install/enable SFTP/SSH2 Support for PHP 8.1?

Hi,

can someone tell me how to install/enable SFTP/SSH2 support for PHP 8.1?
A /usr/local/lib/libssh2.so exists.

The following attempt did not help me either:

pkg install pecl-ssh2
Updating FreeBSD repository catalog...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'pecl-ssh2' have been found in the repositories

I can't seem to get the phpinfo command to output SSH2 support for PHP8.1.

Thanks in advance and kind regards
sidney2017
 
Thanks for your reply!

Does this seriously mean that you can no longer connect an SFTP server with PHP scripts as of PHP 8.1, for example to store the backup files there with a backup system?

Kind regards
sidney2017
 
From freshports:
pecl-ssh2 PECL extension to the libssh2 library
1.3.1 security 1.3.1Maintainer: dbaio@FreeBSD.org Last Update: 2022-09-07 21:58:51Commit Hash people watching this port, also watch:: python27, pkg, coreutils, smartmontools, irssiLicense: PHP301
Dependency lines:
  • php81-pecl-ssh2>0:security/pecl-ssh2
To install the port:cd /usr/ports/security/pecl-ssh2/ && make install cleanTo add the package, run one of these commands:
  • pkg install security/pecl-ssh2
  • pkg install php81-pecl-ssh2
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.PKGNAME: php81-pecl-ssh2Package flavors (<flavor>: <package>)
  • php81: php81-pecl-ssh2
  • php74: php74-pecl-ssh2
  • php80: php80-pecl-ssh2
  • php82: php82-pecl-ssh2
 
Back
Top