Closed (duplicate)
Project:
FileField
Version:
6.x-3.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2009 at 16:34 UTC
Updated:
20 Oct 2009 at 18:12 UTC
I am having a problem uploading files for logged in users. User 1 works fine.
My logs show the error as:
type: access denied
message: filefield/ahah/fac_staff_profile/field_photo/0
The user I am testing has all access privileges to all permissions.
Is this a permission setting that needs to be set on the web server?
Drupal 6.13
PHP 5.1.6
PHP memory limit 128MB
Apache/2.2.3 (Red Hat)
Comments
Comment #1
easp commentedBelow is a snip from Firebug of the issue. Logging in as user 1 does not display this error.
Looks like to me the problem is javascript errors that start a chain reaction with other modules.
I will try to fix the imce error and report back how that effects the filefield error.
Comment #2
easp commentedI found the problem.
I was using CCK's content permission module. On the content type that had the filefield I had another field that was being blocked by the content permission module.
Looking through the filefield module it looks like it checks permissions on each field in the content type. If access is denied on any of the fields then the filefield module gets the access denied.
I hope this helps someone else that has been battling this same access denied problem.
Comment #3
Roi Danton commentedI had the same problem without the usage of content permission and not using IMCE (using content permission and allow access to all fields doesn't help in my case):
Steps (widget type image/ImageField):
The image is uploaded on the server but not added to the field.
Log warning message:
type: access denied
content: filefield/ahah/%content_type/%field_name/%field_valuenumber
Comment #4
Roi Danton commentedOne of the reasons could be the lack of PECL uploadprogress or APC (the Filefield project page sounds as if these libraries are optional).
This issue has been discussed extensively several times:
#297035: HTTP error 0
#297460: Image upload causes 'HTTP error 0'
#329913: still HTTP error 0
#356916: HTTP error 0. /mysite/?q=filefield/ahah/audio_mp3/field_mp3/0
#432038: FCKEditor Causes "HTTP error 0" Preventing Upload
#473760: HTTP 0 error when uploading ANY file
#501980: Image API
Related to these discussions the reasons which cause "HTTP error 0" are quite different:
Since in my case it works for user 1 (but not for other users) and php scripts have enough ressources and only the modules required for filefield (no editor or similar) are installed and the HTTP error 0 also occurs on fresh content types without fields, the reason might be directly related to bugs in Filefield code.
However in my case it does depend on the used browser: The error occurs in Opera but not in Firefox (with many plugins). Perhaps there is a direct relationship between several reasons (available memory, enabled modules, used browser). Only in certain combinations this error occurs.
A detailed discussion about FAPI AHAH and file upload issues can be found in Module development discussions: Form API - AHAH + file field type
Comment #5
chris_herbrand commentedI am fairly new to drupal and was working with the photo gallery from the book "Using Drupal" with author O'reilly.
I have run in to this same issue and decided to play around a bit with the browsers. I tried it in safari it worked just fine but with firefox it was giving me this error. I decided to disable all javascript through the web developer toolbar and it works fine. Anyone have any suggestions that would involve me being able to enable javascript again on firefox and still fix this error? Thanks in advance for any suggestions.
Comment #6
alcoder commentedI have ImageField, ImageCache and ImageApi modules installed. I use Firefox. This error happened to me when I was uploading larger images. For small images everithing worked correctly. I have solved this problem by setting the PHP memory_limit to 96M (previously it vas 32M). I am quite new to Drupal, but I think the error was that 32M memory wasn't enough to generate the thumbnail for the images.
Comment #7
quicksketchLet's keep this consolidated, we inevitably get a dozen different reasons every time this comes up. #473760: HTTP 0 error when uploading ANY file.