"An error occurred in the upload. Please try again later." (6 posts)

  1. Kirkman
    Posted 1 year ago #

    I am using WordPress 3.7.1, and was trying to upload photos using the multi-file uploader. Each time I got the dreaded ""An error occurred in the upload. Please try again later" error.

    Going to the Library, I could see the photos listed, but without thumbnails. Clicking "Edit" showed the image. Clicking the "Edit image" button would cause WP to say "Image data does not exist. Please re-upload the image."

    I scoured the web and tried all the suggestions I could find:

    Deactivated all plugins.
    Switched from my child theme to one of the default themes.
    Tried uploading from the dashboard instead of from within a post editor.
    Reinstalled 3.7.1.
    Tried various browsers.

    Nothing fixed it.

    The images I was uploading were aroung 7mb, and the uploader mentioned there was a file size limit of 8mb. So I decided to try shrinking the images to see if it was a memory issue.

    I started with a panorama which I shrank to 3600x1153 (1.6 mb). It didn't work. So I shrank it again to 3000x961 (1.1mb) and it worked!

    But I wanted to see if I could upload at a higher resolution but with a smaller file size. So I took the same panorama, shrank it to 3600x1153 but saved it at a lower quality level, so the file size was 934kb. It didn't work!

    Weird. So it seemed the problem wasn't absolute file size, but resolution -- or possibly total pixel count (3000x961 had worked, which was a total of 2,883,000 pixels).

    To confirm this, I tried a different photo. I started with it at its original size (4608x456) and gradually reduced it in resolution, uploading each successive version. They all failed the same way with "An error occurred in the upload. Please try again later" (or the eternal "Crunching" hang, if using the dashboard uploader) until I got to 2000x1500 resolution.

    At 2000x1500 (total pixel count: 3,000,000), it looked like it might work. It really crunched and was about to update the thumbnail when instead it displayed this message: "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in /(censored)/blog/wp-includes/media.php on line 1288"

    Weird. The issue persisted as I stepped down from 2000 to 1900 to 1850 pixels wide.

    But at 1800x1350 resolution it worked! This is a total pixel count of 2,430,000, which is obviously lower than the other one that worked for me.

    Can anyone explain this? What is it about this resolution that allows WP to work?

  2. Tara
    Volunteer Moderator
    Posted 1 year ago #

    Have you tried:
    - deactivating ALL plugins temporarily to see if this resolves the problem. If this works, re-activate them individually (one-by-one) to find the problematic plugin(s). If you can't get into your admin dashboard, try deactivating via FTP or SFTP or whatever file management application your host provides. If applicable, also remember to deactivate any plugins in the mu-plugins folder. The easiest way is to rename that folder to mu-plugins-old.
    - To rule out any theme-specific issue, try switching to the unedited default, core-bundled Theme (such as Twenty Twelve or Twenty Thirteen) for a moment using the WP dashboard. If you don't have access to your admin area, you can switch to the default theme by renaming your current theme's folder in wp-content/themes and adding "-old" to the end of the folder name using via FTP or SFTP or whatever file management application your host provides. Alternately, you can remove other themes except the default theme. That will force your site to use it.
    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems (because the hooks remain unless plugins completely removed or some plugins stick around in cached files. So by renaming the folder, you break them and force them inactive).
    - If the above troubleshooting steps fail to resolve the issue, try manually re-uploading all files and folders EXCEPT the wp-config.php file and the /wp-content/ directory from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones. Read the Manual Update directions first!
    - Always backup everything (including your database) before doing any actions, just in case.

  3. Kirkman
    Posted 1 year ago #

    Did you not read my post? I tried everything you listed

    I also found a resolution.

    My question is WHY? Why is this happening?

  4. pazap
    Posted 1 year ago #

    Hi Kirkman
    I suddenly have the same problem can you post your solution?

  5. kastian
    Posted 1 year ago #

    same problem with clean install of 3.8 while uploading an image
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in /wp-includes/media.php on line 1288

  6. esmi
    Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic