Forum Moderators: coopster

Message Too Old, No Replies

PHP partial uploads

occurring randomly for a client

         

Alina

12:08 pm on Aug 13, 2009 (gmt 0)

10+ Year Member



A client of ours is uploading a correct test PDF (1.2 M) and sometimes it gets uploaded and sometimes it does not. Basically it is purely random when the test PDF does or does not get uploaded. We are getting error 3 (file partially uploaded), when the file does not get uploaded.

The client is using IE6. Our main hosting machine is using PHP 5.2.5. Apache 2.2.10 (OS Free BSD). We have increased the following php.ini parameters (and have checked that these are set correctly using phpinfo(), but it still does not work):

max_execution_time = 600
max_input_time = 600
upload_max_filesize = 10M
post_max_size = 8M

Other points which may be of interest are:
- The problem is occuring on our main hosting site, PHP 5.2.5. Apache 2.2.10 (OS Free BSD).
- The client is international, and has tried to upload from several countries (UK, SE, NO, NL CA), to our main hosting site, and the same problem as described above keeps occurring. It is possible that they are all on the same network.
- The client tried the test to another different hosting site (of ours) and it worked fine, everytime. This machine uses: PHP 5.2.9. Apache 2.2.11 (OS Linux).
- 3 of our developers from 3 different countries, and myself and others in our organisation have tested the PHP upload, on our main hosting site. We have tried various IE versions including FireFox and have been unable to replicate the problem.
- The problem recently appeared, possibly due to an upgrade on our main hosting site. But the problem has only recently been brought to my attention.

Is anyone able to help or shed some light on why this may be occuring?

coopster

3:29 pm on Aug 15, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I think your first paragraph tells all. Since the issue is intermittent it is likely a connection drop.

Alina

2:32 pm on Aug 17, 2009 (gmt 0)

10+ Year Member



It is possible but I do not think this is it. I say this because 2 seperate hosts were used when testing. One works every time and the other does not.

coopster

1:01 pm on Aug 18, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



So it fails every time on the other host? There is an Apache configuration directive you may want to check too, LimitRequestBody [httpd.apache.org].

Alina

1:31 pm on Aug 18, 2009 (gmt 0)

10+ Year Member



Not exactly. On Host-1 it works always. On Host-2 the first time it either does not work or the PDF is uploaded but it is corrupted. PHP upload logs show Size is 0 and Error=3 (if it does not work at all). Otherwise size has a value (if PDF is corrupted) but Error is still 3 (i.e partial upload). On the second consecutive upload, it works corectly. Third upload usually works. Then the upload works in stops and starts.

Would this still require a look at Apache LimitRequestBody?

coopster

3:22 pm on Aug 18, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Likely not, not if it does indeed work on occasion.

The problem recently appeared, possibly due to an upgrade on our main hosting site

The intermittent issue is going to be difficult. If it were me, I would begin by upgrading PHP and see if there is resolution. Also, compare the configurations for any differences, not just the php.ini differences but the compiled differences too.

Alina

3:46 pm on Aug 18, 2009 (gmt 0)

10+ Year Member



I have tried it with different PHP versions on Host-2 and the problem still exists. It is so puzzling because it is only one of our clients (that we are aware of) that has the problem - so it a little hard to replicate the problem without involving them ...
Also the small PDFs i.e 26-50K uploads fine everytime on Host-2. So size of PDF (medium 480K and large 1.2M) has a bearing on the problem.
I think that there is some setting that has been changed on Host-2 that conflicts with the client's setup. The Host-2's support team are now investigating the problem - but currently no joy. It will be interesting to see what the problem really is.