Hi everyone,

I'm using PECL's uploadprogress, and my problem appears to be with the progress meter (Throbber works fine) with FileField. This is what I get when trying to upload an image:

"An HTTP error 0 occurred. /filefield/progress/[md5]"

Interestingly enough, when I paste that URI into my browser and refresh it a bunch of times, I get:

{ "message": "Uploading... (6.22 MB of 26 MB)", "percentage": 24 }
{ "message": "Uploading... (8.62 MB of 26 MB)", "percentage": 33 }
{ "message": "Uploading... (16.34 MB of 26 MB)", "percentage": 63 }
{ "message": "Uploading... (19.54 MB of 26 MB)", "percentage": 75 }

So it appears that upload progress is actually working, but FileField or Drupal isn't able to interpret the AJAX response.

Also (since someone will probably suggest it) the memory_limit, post_max_size, and upload_max_filesize are all set to 256M, and the max_execution_time is set to 5 minutes, so none of these limits is being reached. Also, the HTTP error message appears immediately after hitting the Upload button so it couldn't be any of the PHP settings I don't think.

There are about 10 bug reports with "HTTP error 0" and they run the gamut from Firefox plugins to cPanel so I apologize if this has been resolved, but I didn't find one that covered this exact issue (at least in a single bug report). Can anyone help?

Relevant Version information:
PHP 5.2.12
PEAR Version: 1.9.0
Zend Engine v2.2.0
Apache 2.2.14

Thanks-

Nate

Comments

quicksketch’s picture

Category: bug » support
Status: Needs review » Closed (won't fix)

First of all, as you've noted there are literally a dozen different reports: ALL of them are server misconfiguration. I would suggest wading through them and trying them all. I'm not going to re-iterate them all here.

dwkitchen’s picture

I had been experiencing this problem as well, exactly as you describe it and the file uploads sucessfully.

So to fix it I added /filefield/progress* to the "Ignore Pages:" list on /admin/build/securepages.

David

Nathan Goulding’s picture

+1 FTW

jeffam’s picture

Thank you, David. The conflict with securepages was causing the same issue with me. I added the following to the "Ignore pages:" section and the problem went away.

filefield/progress/*

Jeff

excellira’s picture

#3 was what worked for me but eliminating the leading forward slash as shown in #4 completed the solution.

So:

filefield/progress/*

Thanks DavidPlanesTV and jeffam.

truyenle’s picture

Neither of #3, #4, or #5 work for me.

truyenle’s picture

Neither of #3, #4, or #5 work for me.

TimelessDomain’s picture

Here's how I fixed it:

I just commented out the base_url line in settings.php (around line 127):

$base_url = 'http://www.DOMAIN.com'; // NO trailing slash!

change to

# $base_url = 'http://www.DOMAIN.com'; // NO trailing slash!

karlitos’s picture

Thx for the hint!!!

10!!

Anonymous’s picture

Thanks everyone, the fixes in #s 4 and 5 worked for me.
I spent hours trying to solve that, would never have even considered it was a securepages thing...