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.

Certain PDF uploads not working in EE 2.3

October 17, 2011 12:48pm

Subscribe [6]
  • #1 / Oct 17, 2011 12:48pm

    porthos

    55 posts

    This question may be related to a resolved thread.

    Folks:

    I’m having issues uploading certain PDFs. I do not know if the PDFs are the problem or EE. The details:

    Some PDFs can be uploaded but not others.
    Upload directory has been set to 777.
    Files are being uploaded with File Manager.
    This problem affects regular users and super admins.
    The file appears to upload completely and then the message “An Error Was Encountered. You are not authorized to access this page.” appears in the Upload dialog box.
    XSS filtering is set to off.
    PHP limits have been set to 256 in the htaccess file as outlined here.

    Any insight on this would be appreciated.

  • #2 / Oct 18, 2011 10:39am

    Mark Bowen

    12637 posts

    Hi Stephen,

    What is different about the PDFs that do upload fromt those that don’t?

    You mentioned that you have changed the file upload limits to 256MB? That is a lot of memory for a PDF file. What size are these PDF files then?

    Also is this a brand new install of 2.3.0 or did you have a site running on a lower version which used to upload these files and then didn’t after an upgrade?

    Could you run the ExpressionEngine Server Wizard found on this page here just to ensure that your server is fine for usage by 2.3.0 too.

    Thanks,

    Mark

  • #3 / Oct 19, 2011 8:42am

    porthos

    55 posts

    Mark:

    I don’t know what the differences are. The PDFs are supplied by the client. All the PDFs are for the same magazine just different months so I don’t know what would be different.
    The files themselves are not that large. I just upped it to a huge size to see if it makes a difference. I tried 128 as well with no luck. The PDFs are between 5 and 15 megabytes.
    This is an upgrade from 2.2.2 to 2.3.0. We could never really upload files because of bug 16322.
    The EE Server Wizard says that all is well. Every requirement is supported.

  • #4 / Oct 19, 2011 10:05am

    Mark Bowen

    12637 posts

    Hi Stephen,

    The fact that some PDFs can be uploaded yet others can’t is a little weird. I would expect either all PDFs to not upload or for all of them to upload.

    Is it always the same PDFs that won’t upload? For instance say 1.pdf uploads but 2.pdf doesn’t, if you try 2.pdf the next day does it still not upload or does it upload on a different day / time?

    If so then you may need to look at the connection to the server as maybe it is getting dropped somewhere along the line causing the files to fail maybe?

    Does that help at all?

    Thanks,

    Mark

  • #5 / Oct 19, 2011 1:32pm

    porthos

    55 posts

    This may be related to the size of the files. I deleted everything in the directory and uploaded each file through the File Manager. Results:

    6 megs - successful
    9 megs - failed
    6.4 megs - successful
    4.8 megs - successful
    11.8 megs - failed
    8.6 megs - failed
    8.9 megs - failed
    10 megs - failed
    8.9 megs - failed
    10.8 megs - failed

    So is this something I can fix within EE? In the File Manager Upload Preferences the “Maximum File Size” field is blank which I imagine means any size can be uploaded.

  • #6 / Oct 20, 2011 11:06am

    Mark Bowen

    12637 posts

    Hi Stephen,

    I believe that PHP has a default upload max size of 8MB so if you are leaving the Maximum File Size field blank then I believe that this is what you are experiencing here.

    If you fill in the field with a higher value then do those files upload then?

    You may also need to change your php.ini file or perhaps override certain variables using a .htaccess file if that doesn’t work though.

    Does that help at all?

    Thanks,

    Mark

  • #7 / Oct 20, 2011 12:14pm

    Rob Allen

    3105 posts

    Definately sounds like you need to adjust the default upload max size on the server.

  • #8 / Oct 21, 2011 11:16am

    Mark Bowen

    12637 posts

    Hi Stephen,

    Just checking to see if you’ve had a chance to check this out yet?

    Thanks,

    Mark

  • #9 / Oct 21, 2011 1:15pm

    porthos

    55 posts

    No luck. The .htaccess file did change the max size to 256. The local size remains 8, though. I’m working with the hosting company to figure this out.

    They are asking if EE uses Flash or Java to upload files. Does it?

  • #10 / Oct 24, 2011 10:14am

    Mark Bowen

    12637 posts

    Hi Stephen,

    As far as I know ExpressionEngine doesn’t use either of those to upload files no. As far as I’m aware it uses a standard upload form which is enhanced by some JavaScript but that is all.

    Please let us know what your hosting company says about this. It might be that even though you are changing the numbers via .htaccess there may well still be a restriction in place somewhere if this is a shared hosting environment.

    Thanks,

    Mark

  • #11 / Dec 15, 2011 12:32pm

    neuralynx

    62 posts

    Several php.ini parameters can cause this misleading error:

    file_uploads: set to ‘On’
    max_input_time: number of seconds to upload file—set long enough
    post_max_size: apparently needs to be big enough, similar to upload_max_filesize
    upload_max_filesize: set big enough to accept the file size

    Often the defaults are not correct, long enough, big enough for things like video, audio, pdf, and other large files. 

    Especially deceptive is the ‘max_input_time’ since that appears to depend on the connection speed of the client too.

  • #12 / Dec 20, 2011 7:42pm

    Sean C. Smith

    3818 posts

    Porthos,

    I know it’s been a while, but Porthos have you resolved the upload problem?

    Sean

  • #13 / Dec 29, 2011 6:04pm

    porthos

    55 posts

    Sean:

    This hasn’t been resolved yet. I am still working (slowly) with my host. I’ll be back with more information if I get any.

    Thanks.

  • #14 / Dec 30, 2011 5:25am

    John Henry Donovan

    12339 posts

    Thanks for the update Stephen

  • #15 / Jan 30, 2012 12:14am

    porthos

    55 posts

    OK, this really seems to be on the EE side. Max uploads are set to 256 megs. Timeout is set to 10 minutes. Still getting the error with files over 8 megs. Tried zips and PDFs with the same issue.

    I really need to get his sorted out for the client. Does anyone have any ideas?

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

ExpressionEngine News!

#eecms, #events, #releases