WordPress.org

Support

Support » How-To and Troubleshooting » Specific "out of memory" problem

Specific "out of memory" problem

  • Hello,

    I try to upload an image that is 1.38 MB and get this error:

    Fatal error: Out of memory (allocated 34078720) (tried to allocate 14592 bytes) in /homepages/…/htdocs/wp-includes/media.php on line 254 (elipses mine)

    OK so the amount it tried to allocate is clearly less that what is allocated, so what’s going on here?

    I added this line to wp-config.php, after define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    define(‘WP_MEMORY_LIMIT’, ‘100M’);

    I go to phpinfo.php and get this:
    upload_max_filesize 20M

    I go to ‘upload new media’ and get this:
    Maximum upload file size: 30MB

    I’m not too picky, and any of these upload sizes would be fine with me. However, if I can’t even upload a 1.38MB photo, we’ve got a problem. I can upload a 300k photo but that’s too low. Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Oh, and here’s another thing: it appears that these large photos actually do upload, after I get this error. I go to my media library and they are indeed there.

    Is there anything I can do to get rid of the error, though? I think it’s going to throw my users.

    Thanks!

    I added this line to wp-config.php, after define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    define(‘WP_MEMORY_LIMIT’, ‘100M’);

    that won’t be read as it’s too far down
    just place it right after the opening php tag and make it 128M

    thank you for the reply. I moved it and this didn’t help the problem.

    Another thing I’ve noticed is that with these large files, the main photo will post but it won’t create any of the other sizes. When I upload a more reasonably-sized photo, it creates the thumbnails and other sizes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Specific "out of memory" problem’ is closed to new replies.
Skip to toolbar