Page 1 of 1

Error loaded image

Posted: 28 Jul 2020, 16:34
by florent
hello Karl;

From le last update 3.29, I realise that I get problem in some image folders :
"the image could not be loaded" with the next error message :
"Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 3411201 bytes) in /homepages/15/d198115966/htdocs/bsbd/app/parsers/slir/index.php on line 242"

I do the last update, clean the cache & reload option, but still the same problem for somes folders.
Thansk for your help.

Regards.

Florent

Re: Error loaded image

Posted: 28 Jul 2020, 22:38
by mjau-mjau
Hi Florent. That's interesting ... According to your diagnostics, your "memory_limit" is disabled (-1):
bsbd.fr/?diagnostics

That could be good, as long as as this server always has enough memory to resize large images. It does mean that X3 is trying to assign a minimum memory (larger than -1), and in some cases, it could be insufficient. Can you please try this: Open app/parsers/slir/index.php in any text editor, find line 315:
Code
private function set_memory(){
Add "return" immediately after the function declaration:
Code
private function set_memory(){
  return;
With the above, we are bypassing memory management from X3. If your server indeed has sufficient memory, it should now be able to resize the image.

I'm assuming this will fix the issue, but regardless of the result, could you please send me the link to one of the original images that fails to resize?

Re: Error loaded image

Posted: 29 Jul 2020, 12:30
by florent
Hello Karl;

I modify the following file and it's work fine  :smiley:

Thanks a lot & long life to your projects.

Re: Error loaded image

Posted: 30 Jul 2020, 00:54
by mjau-mjau
I'll have it fixed for next update, so that it will ignore memory management when memory_limit is set to -1.

Re: Error loaded image

Posted: 04 Jan 2021, 04:51
by mjau-mjau
mjau-mjau wrote: I'll have it fixed for next update, so that it will ignore memory management when memory_limit is set to -1.
This was resolved in X3.30.0 / forum
photo.gallery/blog/photo-gallery-x3-30-popup/