1

I have live site is running with below location like

/cloud/domains/live/domains/domain.com/http

If I transfer file less than 10 KB it's working fine. But when I transfer file more than 10 KB then not working.

$connection = ssh2_connect("MyHost", port);
if(ssh2_auth_password($connection, 'user', 'password')){
    ssh2_scp_send($connection, "/cloud/domains/live/domains/domain.com/http/test.csv","/test.csv")
} else {
    echo "Connection fail";
}
ssh2_exec($connection, 'exit');
hardik
  • 197
  • 10
  • I hate that extension, and it's non-windows as far as I know. You could try [PHPLibSec](http://phpseclib.sourceforge.net/ssh/intro.html) Which has a native PHP implementation of [sFTP](http://phpseclib.sourceforge.net/sftp/2.0/examples.html)/ [SSH](http://phpseclib.sourceforge.net/ssh/2.0/examples.html). not to mention a bunch of other "stuff" – ArtisticPhoenix Mar 09 '19 at 12:07
  • Thanks for your suggestion but i must use to ssh2_connect – hardik Mar 14 '19 at 04:36
  • In my case I needed it to be compatible on both windows and Linux, and `ssh2_connect` is a real pain to use. `If I transfer file on dev site more than 10 KB it's working fine` this tells me it's probably not your code. It something to do with your environment/network on the one server that is different on the other. This is part of the reason I suggested using something else. It may be worth it to try it just to test if it works, because if it only works on the same server then you know for sure its an environmental issue. Then you can focus your time on looking into that and not the code. – ArtisticPhoenix Mar 14 '19 at 04:43
  • Today i face same issue on both server so i update my question – hardik Mar 14 '19 at 09:56

0 Answers0