views:

442

answers:

4

Hi,

I'm getting a pretty consistent timeout after 90 seconds. I followed this guide to fix the problem and changed my PHP settings to 600 for timeouts and 20M for file sizes.

In my scenario, I am uploading images. A 100k image seems to upload without any problems but 500k image files time out after 90 seconds.

Any ideas on what I can check next?

If not could anyone suggest a good alternative for single file uploads.

Thanks.


Edit 1:

I did some more tests and I cannot upload files over 200kb on any site.

It seems that it may have something to do with my OS (Windows 7 RC2). My girlfriend is on Vista and it works without a problem and I have an XP virtual machine installed which also works.

A: 

Add a call to set_time_limit() at the top of your PHP script to specify a script timeout of more than 90 seconds.

Asaph
set_time_limit() makes no difference: my max_execution_time in php.ini is 600
Nat Ryall
+1  A: 

I would not have expected your PHP script to be called until the upload has completed, so this is probably a web server config issue.

To verify if your script is being executed at all in the problem cases, trying writing to a log file on disk right at the start of your script and see if this is happening. If it is, you know the problem is with your script. If not, you know it is a web server issue.

rikh
agreed it seems to be a web server issue. know of anything that could cause this timeout?
Nat Ryall
A: 
set_time_limit(0);

It allow a infinite time_limit.

Natim
set_time_limit() makes no difference: my max_execution_time in php.ini is 600
Nat Ryall
A: 

I did some more tests and I cannot upload files over 200kb on any site.

It seems that it may have something to do with my OS (Windows 7 RC2). My girlfriend is on Vista and it works without a problem and I have an XP virtual machine installed which also works.

Nat Ryall