Search…

X3 Photo Gallery Support Forums

Search…
 
florent
Experienced
Topic Author
Posts: 97
Joined: 02 Jan 2008, 17:53

Error loaded image

28 Jul 2020, 16:34

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
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12188
Joined: 30 Sep 2006, 03:37

Re: Error loaded image

28 Jul 2020, 22:38

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?
 
florent
Experienced
Topic Author
Posts: 97
Joined: 02 Jan 2008, 17:53

Re: Error loaded image

29 Jul 2020, 12:30

Hello Karl;

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

Thanks a lot & long life to your projects.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12188
Joined: 30 Sep 2006, 03:37

Re: Error loaded image

30 Jul 2020, 00:54

I'll have it fixed for next update, so that it will ignore memory management when memory_limit is set to -1.