• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PHP-SSH2 Problem

TimeBandit

New Pleskian
Hello all!

I've tried to install the php-ssh2 extension, but actually that seems to be impossible for me..
php-ssh2 is installed correct, but Apache won't load the module due to the following error:

Code:
PHP Warning:  PHP Startup: ssh2: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20131226
These options need to match
in Unknown on line 0

Any suggestions?
 
You can use following instruction for installation php ssh2 extension for PHP5.4, for example:

1. Install all necessary packages for compiling ssh2 module:

# yum install make plesk-php54-devel gcc glibc-devel libssh2-devel zlib-devel

2. Compile ssh2 module:

# /opt/plesk/php/5.4/bin/pecl install ssh2 channel://pecl.php.net/ssh2-0.12

3. Add extension to corresponding ini file:

# echo "extension=ssh2.so" > /opt/plesk/php/5.4/etc/php.d/ssh2.ini

4. Reread php handlers:

# plesk bin php_handler --reread

5. Go to Tools&Settings -> PHP Settings -> 5.4.xxxx

6. Enjoy the view of the installed ssh2 module.
 
Can i use this instruction for installation with php 5.5 or 5.6 ?
Works the php ssh2 extension in php5.5 an 5.6 ?
 
Can i use this instruction for installation with php 5.5 or 5.6 ?
Works the php ssh2 extension in php5.5 an 5.6 ?
Yes, just use following changes for php5.6, for example:

# yum install make plesk-php56-devel gcc glibc-devel libssh2-devel zlib-devel
# /opt/plesk/php/5.6/bin/pecl install ssh2 channel://pecl.php.net/ssh2-0.12
# echo "extension=ssh2.so" > /opt/plesk/php/5.6/etc/php.d/ssh2.ini
.....
 
Yes, just use following changes for php5.6, for example:

# yum install make plesk-php56-devel gcc glibc-devel libssh2-devel zlib-devel
# /opt/plesk/php/5.6/bin/pecl install ssh2 channel://pecl.php.net/ssh2-0.12
# echo "extension=ssh2.so" > /opt/plesk/php/5.6/etc/php.d/ssh2.ini
.....

Hello IgorG, thank you for this solution. I have been looking all over the internet for it. So I had the same problem as the original post, however, I have Plesk installed on Ubuntu. I've trying for more than 10 hours straight to fix the issue with no luck. Now I reinstalled Plesk in order to get the server back and running. I want to install the extension, but I'm afraid that it will screw up all my server again. What should I modify for this code to work on my Ubuntu server?

Thank you very much.
 
What should I modify for this code to work on my Ubuntu server?
Just replace installation necessary packages for CentOS

# yum install make plesk-php56-devel gcc glibc-devel libssh2-devel zlib-devel

to corresponding command and package names for Ubuntu. Something like

# apt-get install plesk-php56-devel....
 
Just replace installation necessary packages for CentOS

# yum install make plesk-php56-devel gcc glibc-devel libssh2-devel zlib-devel

to corresponding command and package names for Ubuntu. Something like

# apt-get install plesk-php56-devel....

Thanks, I did that and I got the following:

E: Unable to locate package plesk-php56-devel

E: Unable to locate package glibc-devel

E: Unable to locate package libssh2-devel

E: Unable to locate package zlib-devel

I ran apt-get update but it did not help... :(
 
Because names of the same packages for CentOS and Ubuntu are different. Please try to find appropriate package names for Ubuntu by yourself. Unfortunately, at the moment I have no Debian/Ubuntu test environment.
 
Hi Hamza Jazmati,

for Ubuntu/Debian - based systems, you have the choice to use

apt-cache search plesk | grep php

which will search for all available and possible plesk-php - packages. Just a small hint: ALL "devel" - packages are named with "-dev" instead of "-devel" :p
 
Back
Top