Zen Cart Logo
Forums / General Questions / What php setting for downloads?

What php setting for downloads?

Locked

Views: 1,449

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
16 Mar 2007, 8:39 PM
#1
kmallea avatar

kmallea

New Zenner

Join Date:
Jan 2005
Posts:
28
Plugin Contributions:
0

What php setting for downloads?

Large downloads timeout in the middle of the download. Does anybody know the specific setting that needs to be changed in php so my large downloads do not timeout? Ive been searching the forums and havent found a solution. My hosting company recently changed my sites to a dif server and this problem popped back up. I refered them here to different posts and this is there response.

Hello,

We are limited to what changes can be made to PHP and IIS on a shared hosting server, as well as, when those changes can be made, as doing so would have an effect on ALL sites hosted on the server. It is also normally the case that a given software vendor (such as ZenCart) would be able to provide details as to the exact settings that are required on a hosting server.

If the issue does relate to time-out settings, we cannot change those on a shared hosting server, as they are meant to prevent applications from running endlessly (or just for too long), which would negatively effect performance of all sites on the shared hosting server.

If your needed settings differ from the default settings of the shared hosting server, the best option would be to upgrade your account to a VPS, in which your site(s) would be the only site(s) on the server, and you have full control to make settings changed as needed.

18 Mar 2007, 6:07 PM
#2
disciple avatar

disciple

Totally Zenned

Join Date:
Aug 2004
Posts:
278
Plugin Contributions:
0

Re: What php setting for downloads?

If I remember correctly we set our timeout to 300 and took care of it

18 Mar 2007, 6:21 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: What php setting for downloads?

You may not need a dedicated VPS.

However, if you were hosted on a Linux server instead of Windows, you would have more options available to you such as redirected downloads. These are not only more secure from possible theft, but also handled via apache instead of PHP.

Have you tried turning on "Download by Streaming" in Admin->Configuration->Attribute Settings ?

19 Mar 2007, 3:09 PM
#4
kmallea avatar

kmallea

New Zenner

Join Date:
Jan 2005
Posts:
28
Plugin Contributions:
0

Re: What php setting for downloads?

disciple

What setting would that be in php? Is it just called timeout? In php.ini?

DrByte

Yes I have but that didnt do anything. I thought that didn't work on windows.

19 Mar 2007, 3:12 PM
#5
kmallea avatar

kmallea

New Zenner

Join Date:
Jan 2005
Posts:
28
Plugin Contributions:
0

Re: What php setting for downloads?

Just a thought would it be possible to modify my downloads file to use ini_set to override the timeout settings?

19 Mar 2007, 3:32 PM
#6
kmallea avatar

kmallea

New Zenner

Join Date:
Jan 2005
Posts:
28
Plugin Contributions:
0

Re: What php setting for downloads?

Looks like a no go. I tried

ini_set ("expect.timeout", "600");

At the top of header_php.php and dmy download stopped at 63%, a 43mb file.

19 Mar 2007, 9:51 PM
#7
disciple avatar

disciple

Totally Zenned

Join Date:
Aug 2004
Posts:
278
Plugin Contributions:
0

Re: What php setting for downloads?

disciple

What setting would that be in php? Is it just called timeout? In php.ini?

We use a linux box and it is in my http.conf file but I don't know what that equates to in windows.

But you are on the right track. The issues we were having were downloads ending prematurely or sometimes the download would finish but not have the correct number of bytes it should rendering it as corrupt. Once we adjusted the timeout setting all downloads were fine and we have files ranging from 30 - 60 megs.

Sorry I can't be of more help.

Rick