We have a problem on my servers on ssh2.
My PHP program failed on :
if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist");
When I do :
php -a
$result = ssh2_connect('localhost',PORT);
=> it is running ok.
A short script executed with Putty :
<?php
if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist");
$connection = ssh2_connect(IP, PORT);
echo "<p style='color:green;'>ssh2_connect: Ok</p>";
ssh2_auth_password($connection, 'root', PWD);
echo "<p style='color:green;'>passwd Ok</p>";
?>
=> it is running ok.
But the same script launched by a Browser, failed : "function ssh2_connect doesn't exist"
Is there an apache special configuration to do ? (php 7.3, ubuntu 16.04)
I have already added :
extension=php_ssh2.dll
extension=ssh2.so
In the php.ini (/etc/php/7.3/apache2/php.ini)
And restart apache service. But "function ssh2_connect doesn't exist".
Is there any other configuration to do ?
Than's for your help.