sean Thanks, it works now 😀
For reference, for CLI usage:
php81 -d extension_dir=~/opt/php81_exts -d extension=ssh2.so
Or creating a local php.ini
:
$ php81 -i | grep "Configuration File"
Configuration File (php.ini) Path => /etc/opt/remi/php81
Loaded Configuration File => /etc/opt/remi/php81/php.ini
mkdir -p ~/etc
cp /etc/opt/remi/php81/php.ini ~/etc/php81.ini
Edit ~/etc/php81.ini
and edit/add the following:
(Add E
to variables_order
to be able to use the env var $HOME
in extension_dir
.)
variables_order = "EGPCS"
extension_dir = ${HOME}/opt/php81_exts/
extension = ssh2.so
Then you can: php81 -c ~/etc/php81.ini
And add to your ~/.bashrc
: alias php81='php81 -c $HOME/etc/php81.ini'