Jump to content

Recommended Posts

We have got 2 Debian servers - a testing and a production server. I could successfully install the SSH module for PHP in the test server. However,in Production Server, I would like to copy the compiled packages and make the changes in php.ini to add the ssh module.

 

I have Copied libssh2.so file and the ssh.so file from test to production server.

Added the extension directive in php.ini

 

Doing this I can connect with SSH to the remote server but fopen into the remote server fails.

It fails in the following code :(in the production server)

 

@fopen('ssh2.sftp://'.$sftp.$remoteFile, 'w');

 

$sftp is the SFTP connection

$remoteFile is the full path of the remote file that needs to be created.

 

This code works perfectly in the test server.

 

What did I do wrong. Any help is welcome including some explanation on how the libssh2 package is compiled in Debian.(I am quite new to Debian and in the process of understanding how the system works).

 

Link to comment
https://forums.phpfreaks.com/topic/161571-ssh-module-installation-in-debian/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.