PHP warning: Module ‘ssh2’ already loaded in Unknown on line 0

Date : 07-Jan-2020

Hello! Sometimes when working on the server , you may get the php warning message as “Module ‘ssh2’ already loaded in Unknown on line 0”.

This warning means that something is not right with your php configuration.

Let us see how to sort out this error.

Solution 1:

In yor php.ini (or) ssh2.ini file, search for the below line,

 extension=ssh2.so 

Try commenting this line and reload your php.

You cannot see the warning message now. The error is fixed.

It might be due to the ssh2.so module is loaded twice, hence showing error message as ssh2 is already loaded.

Solution 2:

In the directory /etc/php.d (or) /etc/php/conf.d, check for duplicate files.

If there are 2 files with the same content or if there are 2 files which include the ssh2 module, then do the following.

Remove any one of the files or remove the line that includes ssh2 module in any of the files

Thats all!! The issue is resolved !

Thank you!

Leave a Reply

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny