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.

Unable to upload documents to uploads folder

December 06, 2010 1:23pm

Subscribe [4]
  • #1 / Dec 06, 2010 1:23pm

    fanderson

    899 posts

    I am working on a site that is running 1.7.0 Build:  20101018

    and get the following error when I attempt to upload a PDF as part of an entry.

    A problem was encountered while attempting to upload your file

    The upload directory is: public_html/images/uploads/documents and set to 777

    I checked the settings on the upload directory and confirmed that the permission allow uploads and it is set to all file types.

    I would appreciate some help getting this resolved.

    Thank you.

  • #2 / Dec 07, 2010 2:35am

    John Henry Donovan

    12339 posts

    Forrest Anderson,

    What size is the PDF file?
    Are you uploading as a SuperAdmin of a member of a different group with cp permissions
    Are you using any add-ons?

  • #3 / Dec 14, 2010 11:57am

    fanderson

    899 posts

    I am running 1.7.0 Build:  20101018.

    The files are less than 300kb and i have the limit set to 2MB

    I am uploading as Super Admin.

    Running the following extensions:

    Edit Tab AJAX, Solspace software update, jQuery for Control Panel, MD Markitup, LG TinyMCE, FieldFrame

    Any clues?

    Thanks!

  • #4 / Dec 14, 2010 3:18pm

    jcollinsmedia

    25 posts

    Make sure there is a trailing forward slash at the end of the upload path.

    /var/www/system/uploads/docs/

    Also make sure that the directory has permissions set to “777”.

  • #5 / Dec 14, 2010 3:21pm

    fanderson

    899 posts

    Confirmed on both points. Thanks.

  • #6 / Dec 14, 2010 3:36pm

    jcollinsmedia

    25 posts

    Maybe try not applying XSS filtering(?) To turn this off (as a test) login to your control panel, then go to Admin > System Preferences > Security and Session Preferences. Scroll down and select “No” for the option “Apply XSS Filtering to uploaded files?”

    Again, I’m not sure if this is safe for you, but you can try ruling it out at least.

  • #7 / Dec 14, 2010 3:46pm

    fanderson

    899 posts

    I just tried this and I still get the same error. Thanks.

  • #8 / Dec 14, 2010 3:58pm

    jcollinsmedia

    25 posts

    If php isn’t booting the file and permissions are OK my best guess is that something is fishy with your “Server Path to Upload Directory” or “URL of Upload Directory” paths. I’ll keep thinking…

  • #9 / Dec 14, 2010 4:03pm

    fanderson

    899 posts

    The problem is that everything appears to be configured correctly. In fact, I have uploaded several files to the server via ftp and they load correctly into the entries. I am just trying to resolve the upload problem because the client wants to be able to upload files independently. So if you have any other ideas, I will give it a try. Thanks for the effort on this.

  • #10 / Dec 14, 2010 7:07pm

    rokker

    179 posts

    i got this little trick from a Sue Crocker post…. it was a link to this article:

    Where Am I


    basically, you paste the code into a txt file and rename it whereami.php

    upload it to the folder you’re trying to set the path for and use your browser to load that file, ex http://www.mydomain.com/images/whereami.php

    it will give you that server path, and then at least you can check it against what you have to make sure it is correct. it’s a handy file to keep around.

    here’s the code you can copy and paste

    <?php echo realpath(dirname(__FILE__)) . '/'; ?>
  • #11 / Dec 15, 2010 9:56am

    fanderson

    899 posts

    Hi Rokker,

    This is a handy little utility. I used it and my path matches so that part is resolved. Still can’t upload so it must be something else.

    Thanks for taking the time to pass this along.

  • #12 / Dec 15, 2010 10:03am

    jcollinsmedia

    25 posts

    Will it let you upload any file to that directory, like a JPG, PNG, etc.? Or does it completely reject all uploading?

  • #13 / Dec 15, 2010 10:07am

    fanderson

    899 posts

    I tried uploading a jpeg and get the same error.

  • #14 / Dec 15, 2010 5:05pm

    Ingmar

    29245 posts

    The error message usually means that EE is unable to write to that directory. This might be a permission issue on your server, or perhaps one of configuration (PHP, perhaps). Have you asked the host about it? There should be server logs as well that might be helpful.

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

ExpressionEngine News!

#eecms, #events, #releases