ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

File upload issue: large files return a "You do not have access to this upload directory" error

April 13, 2011 9:12pm

Subscribe [2]
  • #1 / Apr 13, 2011 9:12pm

    mollyawatson

    7 posts

    Hi all,

    So, I’m encountering a problem when trying to upload large files (specifically, .pdfs) into EE. When I try to upload a 58 MB file through the Publish Form, the page sits loading for a long time, and eventually gives me a “You do not have access to this upload directory” error (even though I’m able to upload smaller .pdfs into that same directory without issue). When I try to upload the same file through the File Manager error, the page (again) sits and loads for a long time, then gives me a “You did not select a file to upload.” (I think this means it gives up). Again, when I upload a smaller .pdf into the same directory, it uploads without any problem.

    I checked in with the website hoster, and they said they’ve set the upload limit in PHP of 128 MB (looking in Tools > Utilities > PHP Info confirms this).

    Any ideas what might be causing this issue? Or how to remedy it?

    Oh, btw, I did check the permissions on the file I’m trying to upload, which is at 777 (or Read & Write for all), and I turned off XSS filtering for file uploads, but so far no luck.

    Thanks in advance for your help! 😊
    -Molly

  • #2 / Apr 14, 2011 3:20pm

    Brandon Jones

    5500 posts

    Hi Molly,

    1. What version and build of EE are you using?
    2. What PHP setting specifically are you looking at?
    3. What is set for PHP’s max_execution_time?

  • #3 / Apr 14, 2011 3:46pm

    mollyawatson

    7 posts

    Hi Brandon!

    1.) I’m running EE v2.1.1, Build: 20101020
    2.) I’m looking at memory_limit, which is showing 128M
    3.) max_execution_time is set to 300 (local) and 180 (master).

    Not sure what the unit of measurement is on max_execution_time…

    Thanks!
    -Molly

  • #4 / Apr 14, 2011 5:41pm

    Brandon Jones

    5500 posts

    Hi Molly,

    max_execution_time is measured in seconds, so that likely needs to be raised, or set to 0 to disable. However, it also looks like you performed a build update at some point instead of a version update. Build 20101020 was version 2.1.3, so it’d be worth running through the version update instructions again.

  • #5 / Apr 19, 2011 7:19pm

    mollyawatson

    7 posts

    Hi Brandon,

    Thanks for your response! And for bearing with me as I work through this problem.

    So, I ran the version update as your recommended, now my version is 2.1.3 and build: 20110411. Do those two seem to line up better?

    After I ran the update, however, I’m still experiencing the same issue, where the file upload fails and I get a “You do not have access to this upload directory” error. A bit more information:

    1.) I created two smaller .pdfs (originating from the same file as my large .pdfs), one that’s 10.2 MB, and one that’s 1.8 MB. The 1.8 MB file uploads just fine, but the 10.2 MBgenerates an error.

    2.) I tried adding the following code to my .htaccess file: “php_value max_execution_time 18000”. When I save it, it crashes the whole site, and returns a 500 error. My .htaccess file is generated by an EE extension, NSM .htaccess Generator (http://expressionengine-addons.com/nsm-htaccess-generator), so I tacked on the above code at the bottom of the file.

    3.) The web hoster for this site doesn’t allow php.ini files to override their server settings.

    So… any ideas on how this issue might be thwarted? Is there a way to update the max_execution_time value aside from .htaccess or php.ini?

    I’m going to contact the hoster as well to see if they’ll lift the limit on max_execution, but I’d sure appreciate any suggestions in the interim.

    Thanks a ton!
    -Molly

  • #6 / Apr 19, 2011 10:53pm

    Lisa Wess

    20502 posts

    Molly, can you try something for me? It’s a bit out in left field, but it may shed some light on the issue.

    Can you go to Admin > Security and Session Preferences, and turn off the XSS Filtering?  Then try uploading your larger PDF file.

    If that doesn’t work, the max execution time - even if we could test with a temporary bump - would be really helpful.  You might also ask your host if the temporary directory PHP uses is set up and has the correct permissions.

    Thank you!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases