imagecreatefromstring memory error (random amount of ram) (2 posts)

  1. davidedalcolle
    Posted 6 years ago #

    When uploading images on my web sit i get an error from php about exhausted memory. The error occurs in image.php on imagecreatefromstring function.

    Strange Issue #1: i get this error when uploading mid sized images (800x600) or greater, but i have quite enough php ram to upload 800x600 pics since I have 96 MB of php memory.

    Strange issue #2: the amount of allocated ram displayed in error messages changes every time from 8 to 40MB:

    Fatal error: Out of memory (allocated 14680064) (tried to allocate 2000 bytes) in /hsphere/local/home/masteraccount/pavan.nozonenet.com/wp-admin/includes/image.php on line 149

    14680064 = 14MB, but i have 96MB.

    I also installed a couple analysis plugins and the memory is actually 96MB; wordpress setting was correctly modified according to this limit.

    Strange issue #3: sometimes certain images works fine, sometimes, when uploading the SAME image, i get an error, even 5 minutes later.

  2. Vinicius Massuchetto
    Posted 5 years ago #

    WordPress has its own memory limit control. Look for WP_MEMORY_LIMIT variable on wp-config.php, and try to increase it.

    define('WP_MEMORY_LIMIT', '96M');

Topic Closed

This topic has been closed to new replies.

About this Topic