Module 'ssh2' already loaded in Unknown on line 0

前端 未结 3 1960
你的背包
你的背包 2021-01-19 02:39

I use the functions below to copy files from one server to another. It works most of the time, but sometimes I start getting this error in log files:

Module          


        
相关标签:
3条回答
  • 2021-01-19 02:59

    If the above does not work, take a look inside /etc/php5/conf.d

    If you see duplicate ssh2.ini files, remove any extra ones.

    In my case I had 50-ssh2.ini and ss2.ini. Both files were providing the line:

    extension=ssh2.so
    

    For me removing 50-ssh2.ini solved the issue.

    0 讨论(0)
  • 2021-01-19 03:01

    The error message Module 'ssh2' already loaded in Unknown on line 0 means that there's something off in your PHP configuration. Check to see if there's a line that says extension=ssh2.so in your php.ini. If so, remove it and check if everything is still working. Possibly, the extension=ssh2.so is loaded twice, meaning PHP will complain that the module is already loaded.

    Good luck.

    0 讨论(0)
  • 2021-01-19 03:08

    In my case, I commented out the one line in ssh2.ini located here: /etc/php5/mods-available/ssh2.ini

    The content of this file now is as follow:

    ;extension=ssh2.so
    

    Thanks!

    0 讨论(0)
提交回复
热议问题