PHP : Net_SFTP library, unable to download big files

1.1k Views Asked by At

I am working on a PHP project which has to deal with large attachment files. I am using SFTP server for storage of such big files. For uploading and downloading attachment files I am using Net_SFTP library.

Upload is working fine. But download functionality works fine only for the files for which file size is limited to 20 MB. But if my file size is larger than 20MB then my download gets stuck at 21672 Bytes (~20.7 MB) and it returns the empty file when SFTP timeout occurs.

I have already checked memory_limit, max_execution_time and sftp timeout limit of php but it didn't helped.

Please help!

eHussain

1

There are 1 best solutions below

0
On

What is the php version ?

have you tried setting the max_input_time to 0 ?

max_input_time integer

    This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. It is measured from the moment of

receiving all data on the server to the start of script execution.

(from PHP web-ste)