When uploading files via the Bulk Uploader, logged in as any user besides admin, I'd get the error:

"Error uploading file filename.extension: Invalid user"

After some investigation, it appeared the $_COOKIE wasn't being set properly. It was set before sess_read, but inside sess_read it was NULL, and caused the above error.

Instead of checking if the user is logged in via sess_read, I changed it to check to see if the global user id is greater than 0 and it works great.

Others have had this problem:

http://drupal.org/node/1240752#comment-4877076

If you think this is a good solution, please consider the attached patch for the next release.

Files: 
CommentFileSizeAuthor
imce_swfupload.module.patch636 bytesjamesdixon

Comments

tekante’s picture

Assigned: Unassigned » tekante

I'll have to do some research on this. I believe that I was originally unable to rely on the global $user because the flash object based request didn't pass along the session cookies from the browser so you weren't really logged in during processing. Hence feeding the session ID and submitting it as part of the form. Can you let me know which browser you were testing with?

jamesdixon’s picture

Gotcha, I was using Firefox 7.0.1. It may be some obscure server configuration issue as well, as it's only been reported by a couple users.

tekante’s picture

Thanks for the additional info, I now realize I also should have asked for your flash version as well. Thanks.

jamesdixon’s picture

I have flash: MAC 10,1,102,64.

Now that I think of it this didn't start happening until I uploaded to the live server. There were also some other weird configuration issues that were blocking IE users (mod_security was creating 406 errors when attempting to upload files).

I'm almost certain it has something to do with the server environment, but to pinpoint it down to what I'm not sure. Here's some info if it helps:

PHP Version 5.2.17
MySql Client Version 5.0.91

djween’s picture

subscribe