Jump to content

Upload Images on one Template doesn't work anymore | Not enough memory to load/resize


Martin Wuehr
 Share

Recommended Posts

Hello everybody,

I'm hosting a Processwire Installation for a client. It runs on Processwire 2.5.3. Over the years everything was fine but now there is an issue with one Image-Field in one Template. Trying to upload an Image the Error "Not enough Memory to load/resize" occure. Other Image-Fields in all other Templates working without any issue. The Images I Tried to upload are very small (600px * 420px). The Images blongs to a News feed, and worked before.

I read about the problem in the forum but I can't get this solved. I have no access to the php.ini to modify the memory_limit.

I tried to update the Processwire Verion but failed. (Tried 2.7 /2.8 / 3.2) Got Always Internal Server Error and in the error Log: 

Compile Error:     Cannot redeclare PageEditFieldPermissionConfig()….

Has anybody any idea how I can get this solved?

Thank you so much

Martin

 

Link to comment
Share on other sites

try to increase the memory limit via .htaccess file

php_value memory_limit 256M

and check it by looking to the phpinfo() before you try to increase and afterwards, if it does take effect.

  • Like 1
Link to comment
Share on other sites

Thank you for your answers,

regarding to php info the Memory Limit is set to -1. So no Limit?

When I try to set the Limit via .htaccess to 256 a internal Server Error occure. the site is no longer reachable.

The strange thing is, other image fields in the Installation working just fine. These are also fields with bigger Image to load. So how can the php Limit an issue?

When integrating one of the other (working) Image fields in the template where the problem is, it's also not possible to upload an Image. So it's more a problem of the template?

Thank you

Martin

lbf_memory.jpg

Link to comment
Share on other sites

What does the full error message say?
Are there any permissions set in that field or template or user?
Have you tried another image?
How large is your image - MB and pixels?
Can you switch to a more recent PHP version (your 5.6 seems a bit dusty)?

Also check upload_max_filesize and post_max_size.

Link to comment
Share on other sites

Hello,

The error is: imagename - not enough memory to load / resize

There are permissions set for roles which have access to this template.

I tried other images too. All Image are small 640px * 480px with ~ 60kb - 80kb (jpg / 72dpi / rgb 8bit)

We can't upgrade the PHP Version here. (for complex reasons)

post_max_size and upload_max_filesize are 64M

The Image field was working fine. It belongs to a news feed. At one point it stoped working.

lbf_image.jpg

Link to comment
Share on other sites

9 minutes ago, Martin Wuehr said:

The Image field was working fine. It belongs to a news feed. At one point it stoped working.

Ok... well... I don't know. 

There are only a few things and thoughts left so far.

  1. check what has changed in the last days/weeks since it broke
  2. maybe GD or ImageMagick (don't know if this exists in 2.5.x) are failing
  3. ask the hosting company if there were any changes (security efforts, file scanners, whatever)
  4. remove any restrictions on that field
  5. use another browser
  6. use another user
  7. check console for errors
  8. check disk space

Last and final thought:

Make a backup, test it locally and take it apart.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...