[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Downloading to PHP Server

I am trying to download a very large file (almost 1 gig) on a monthly cron job using ftp_get and the file times out before finishing.

Any suggestions on how to get this file downloaded?

Apache server w/ cPanel
0
Jeff
Asked:
Jeff
  • 2
1 Solution
 
quincydudeCommented:
I know you can set the timeout of ftp using
ftp_set_option

but not sure if it can help in your case. Good luck.

http://cn.php.net/manual/en/function.ftp-set-option.php
0
 
Ivo StoykovCommented:
if you user cron for this, you do not need php justadd to this cron job
wget ftp://address.to.get/the.file
HTH
i
0
 
Lukasz ChmielewskiCommented:
post the httpd.conf
but I think there should be KeepAlive directives set to the time the file downloads
0
 
Lukasz ChmielewskiCommented:
one more: check the values in php.ini
1. setting max_execution_time in the php.ini file
2. set_time_limit(int seconds)
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now