Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Larger attachments won't download

UserPost

12:40 pm
May 5, 2010


frankieandshadow

Member

posts 2

1

Using role-scoper 1.0.4 files larger than 9.5MB give 'page not found' errors when downloads attempted (these are links to downloads, not embedded media). I can have two links on the same (protected) page, both uploaded and inserted into the page identically, and the smaller works but the larger doesn't.

If I change $use_cache to always be TRUE in attachment-filters_rs.php, the problem goes away, though at what cost I don't know. This same line has a test for file size against the magic number 9500000 which is presumably why larger files do different things. (What is the significance of this particular file size?)

I tried updating role-scoper (deactivate; move old plugin files; unzip; reactivate plugin) and _all_ attachments then give page not found errors.

I tried Firefox and IE.

12:50 pm
May 5, 2010


Kevin

Admin

posts 2402

2

What "new" version gave you this error?

8:18 pm
May 5, 2010


Kevin

Admin

posts 2402

3

frankieandshadow said:

Using role-scoper 1.0.4 files larger than 9.5MB give 'page not found' errors when downloads attempted (these are links to downloads, not embedded media)… This same line has a test for file size against the magic number 9500000 which is presumably why larger files do different things. (What is the significance of this particular file size?)


Role Scoper 1.0.x used a File Filtering mechanism which was based on manually contructing the http header and then returning the requested file contents manually via the PHP readfile function. This proved unreliable, especially for very large files. The 9.5 MB limit was somewhat arbitrary, based on debugging experience with another user.

Ultimately I wound up designing an entirely different File Filtering mechanism, based on header redirects. This was introduced Dec 30, 2009 with version 1.1 and stabilized by mid-February with version 1.1.6. Recent development and support has revealed two more file filtering bugs which affect a minority of installations. These are:

  • File Filtering is not imposed based on Post/Page Restrictions or Default Category Roles (also required Private visibility)
  • Attachment filenames with spaces, parenthesis and other special chars causes corrupt or ineffective .htaccess (possibly resulting in Internal Server Error)

That second bug might be the cause of your attachment filtering failure. I mailed you some development code which includes fixes for those issues. It will soon be available as RS 1.2 Beta. Let me know if you still have problems.


About the Agapetry forum

Currently Online:

9 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin