I've been using ssh2_scp_recv() to download .tar.gz files. Each .tar.gz file ranges from 250 KB to 2 MB. However, I only receive about 140-500 KB of those files, and all 6 I'm downloading are incomplete.
When I used FileZilla/SFTP to download the files, I was able to get the complete file with no problems.
I am removing the time limit for script execution: