Hi all,
I have been battling with the dreaded HTTP error 0 problem for days now and I'm seemingly no closer to a solution. I have tried almost every solution proposed in the official bug report and still with no luck.

For those not familiar with the problem here is the scenario:
- I have a Content Category setup with a series of fields. One of those fields is a File Upload field.
- When I try to add or edit content the system allows me to select a file from my local machine.
- When I click on the Upload button I receive the following errors:
(when trying to upload an image)
An HTTP error 0 occurred.
/filefield/ahah/resource/field_resource_image/0

(when trying to upload a file)
An HTTP error 0 occurred.
/filefield/ahah/resource/field_files/0

Here is the forum topic I've been trying to wade through to find a solution
Discussion of Bug

So far I have tried switching to ImageMagick, applying a patch to the filefield.module. I didn't try the modifications to the memory limit or max upload size because they are already set to 512M and 10M. I am trying to upload files that are 28k!!!

Anyway after reading a heap more web pages I decided to try the Google Chrome Developer Tools to see if I could ascertain anything there and while I can now see some error messages I'll be stuffed if I can work out where or how to fix it. Basically the second that I click on the Upload button I receive the following two errors:

- Uncaught TypeError: undefined is not a function
- http:///filefield/ahah/resource/field_files/0 403 (Forbidden)

The first error appears to relate to jQuery. When I expand the details I just get a long listing of jQuery. While that seems logical it shouldn't trigger this error... which is what makes me think it's something to do with the second line.

I've tried everything and to be honest I'm almost ready to give up. I don't know where else to look.

Oh.... more details for anyone interested:
Web Server: LiteSpeed
Drupal Version: 6.22
PHP: 5.38
MySQL: 5.1.52

Any help from anyone would be appreciated.

Thanks
Josh

Comments

glasswool’s picture

subscribing...

carlhinton’s picture

The only way that I could get around this was by turning off javascript support using form_alter on these node pages !! Ouch - what a hack

CzarnyZajaczek’s picture

This is related to filefield ajax, which do not set PHP header "text/javascript", PHP sets by default "text/html". As I can see in comment in the module code, there was some problemw with "text/javascript" header with file uploads, so they decided not to use it.
Try this solution:
http://drupal.org/node/434394#comment-2623372 it should always work (simply do not use "Uploda" button but save node)
or check if it is your case:
http://drupal.org/node/434394?page=1#comment-6965470 (javascript appended ie by host provider for statistics)
or try to change filefield_js function in filefield module to use drupal_json (or set PHP header "text/javascript" or even "application/json" directly in filefield_js just before print drupal_to_js), it would be the most versatile solution but I can't tell you if it will work.