New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put requests truncate at 24402 bytes #1461
Comments
I wonder what'd happen if you did If that doesn't help then seeing the SFTP logs could help. You can get them by doing I also wonder how well that SFTP server runs with WinSCP as the client or psftp. Is https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.0.0.0p1-Beta what you're using? I could install, try to reproduce and create a ticket in their github tracker if appropriate (wouldn't be the first time for me) Thanks! |
Why is this constant doing exactly? If I had to guess from my limited knowledge of the code, the library batches its put operations and reads the result after reaching the queue size? Should I be happy with setting this constant, or would there be a better solution? I'm not sure what the SFTP Server is, as I've not set it up. |
Yup - that's pretty much it. PuTTY's psftp and probably WinSCP, as well, do the same thing. It greatly speeds up file transfer. My guess is that if it doesn't work with phpseclib it doesn't work with either of those SFTP clients either. FWIW I've installed https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.0.0.0p1-Beta and am trying to see if I can reproduce the issue locally. This wouldn't be the first bug in that package that phpseclib was the first to find: PowerShell/Win32-OpenSSH#48 Anyway, I'll let you know! |
I'm totally not able to reproduce the issue. I tried https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.0.0.0p1-Beta and it identifies itself the same way as the server you connected to did, as shown in the log files you posted. Despite that the file loads without issue... Are you able to reproduce the issue with WinSCP? I really hate to do this but I think, for the time being, it's probably best if I dismiss this as a one-off. You have a workaround and idk that I'm prepared to undo a useful feature because of one post. At least not for the time being. If I get more reports of this with SSH-2.0-OpenSSH_for_Windows_8.0 then I could make it so that SFTP instances to servers identifying themselves thusly auto-set Thanks! |
I'm having issues uploading files to an SFTP server
When making a put request, only 24402 bytes of the file make it to the SFTP server
The put line is:
After 10 seconds or so (with the default timeout), I get this output:
If I use
->setTimeout(60)
, it hangs for longer but eventually puts out the same output, with the same 24402 bytes on the remote endI'm running phpseclib 2.0 with php 5.6 on Red Hat 6, the SFTP server is Windows
I've also used
->getLog()
in case that's useful. Here's the output: https://pastebin.com/9E2Kwx7SThe text was updated successfully, but these errors were encountered: