Page 1 of 1

Fatal error: Allowed memory size

Posted: Fri May 11, 2018 7:56 pm
by Tata
I am not sure where comes this error from
Fatal error: Allowed memory size of 314572800 bytes exhausted (tried to allocate 72 bytes) in /www/c/m/u13296/public_html/_sub/milanladyka/cmsimple/functions.php on line 278
It is returned when I try to call a hidden page directly.
URL: http://milanladyka.cmsimple.sk
direct call: http://milanladyka.cmsimple.sk/?help

Re: Fatal error: Allowed memory size

Posted: Sat May 12, 2018 9:24 am
by cmb
Tata wrote:
Fri May 11, 2018 7:56 pm
cmsimple/functions.php on line 278
Please post the code around this line.

Re: Fatal error: Allowed memory size

Posted: Sat May 12, 2018 11:25 am
by Tata

Code: Select all

#276 function XH_evaluateSinglePluginCall($___expression)
#277 {
#278     foreach ($GLOBALS as $___var => $___value) {
#279        $$___var = $GLOBALS[$___var];
#280    }
#281    return preg_replace_callback(
#282        '/#(CMSimple .*?)#/is', 'XH_escapeCMSimpleScripting',
#283        eval('return ' . $___expression . ';')
#284    );
#285}
I assume this will have something to do with thumbs/watermarks creation in imgalbum/imgslider. However, removing the expand call from the help page, the error is gone...

Re: Fatal error: Allowed memory size

Posted: Sat May 12, 2018 12:05 pm
by cmb
Tata wrote:
Sat May 12, 2018 11:25 am
I assume this will have something to do with thumbs/watermarks creation in imgalbum/imgslider. However, removing the expand call from the help page, the error is gone...
It's possible that it is not directly related to expand(), but see viewtopic.php?f=12&t=11676&p=56062#p56062.

Re: Fatal error: Allowed memory size

Posted: Sat May 12, 2018 1:19 pm
by Tata
Well, this was a problem then with nested subpages with other plugins calls. But now, the structure is simple. The h1 page with the plugin call and hidden h2 pages. No other plugin call on the h2 pages.

Re: Fatal error: Allowed memory size

Posted: Sun May 13, 2018 11:11 am
by cmb
Tata wrote:
Sat May 12, 2018 1:19 pm
Well, this was a problem then with nested subpages with other plugins calls. But now, the structure is simple. The h1 page with the plugin call and hidden h2 pages. No other plugin call on the h2 pages.
There is {{{expand}}} on http://milanladyka.cmsimple.sk/?help/Pluginy ("Funguje tak, že príkaz pre plugin {{{expand}}} sa umiestni na "materskú" stránku (napr. H1)."); this causes infinite recursion, resulting in the out of memory error in your case. There are other plugin calls on subpages of help which probably should be escaped also.

Re: Fatal error: Allowed memory size

Posted: Sun May 13, 2018 11:18 am
by Tata
Ah, totally forgotten about the call on the help page.