Bug #22423 Version Retired

When PHP memory limit is set to -1 for unlimited. Uploading a JPEG or PNG causes an exhaustive mem

Version: 3.4.3 Reporter: meslater

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

When PHP memory limit is set to -1 for unlimited. Uploading a JPEG or PNG causes an exhaustive memory panic. It is falsely imposing a memory limit when one doesn’t exist. It is interpreting that PHP setting incorrectly as we were unable to upload a 3k file.

The server has more than 2gig of ram available during the whole process so it could not have exhausted memory. Totally recreate-able in 3.3.2

Happens in file manager also happens in content manager.
\system\ee\legacy\libraries\Image_lib.php
line: 1246 for imagecreatefromjpeg($path); that dies
same area for PNG as well.

No known solution at this point we had to hardcode the PHP memory limit.

  • In system/ee/legacy/libraries/Upload.php replace:

    if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != '')

    with:

    if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != FALSE)
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases