Page 1 of 1

Fatal error after upgrade to 1.0.2

Posted: Mon Oct 02, 2006 5:32 pm
by chris..
Hi everybody,

just to say I think there's a bug somewhere with langage files in the core.

I've two CMS 1.0.2 sites -Still nice work, btw-, one installed from scratch and the problematic one upgraded from 0.13. Both have more or less same modules, and some of them are buggy when used with other langage than English (well, french in fact). I've noted two error messages to help developpers :

Code: Select all

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 45840 bytes) in ROOTPATH/lib/classes/module_support/modlang.inc.php on line 74

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 801304 bytes) in ROOTPATH/lib/smarty/CMS_Compiler.class.php on line 36
The error in modlang.inc.php is the most common (I've had the second one only two times or three) and happens when trying to view Albums in admin section or Calendar/events on frontend.

I've tried some tricks just for fun, like copy/paste en_US.php file, rename it fr_FR.php to implement in the Calendar drop-down langage list settings, still Fatal Error. And I tried the .htaccess super memory file trick (32M allowed !) but still the same.

It's not a real problem for me (I set the admin and frontend langage in English for the moment), but it's a bug.

Again, only for the upgraded one.

Re: Fatal error after upgrade to 1.0.2

Posted: Tue Oct 03, 2006 8:17 am
by Dee
It doesn't look like a bug, PHP is running out of memory.
To prevent that PHP's memory_limit should be raised on the server. Doing so in a .htaccess file doesn't  always work (depending on server settings).

Re: Fatal error after upgrade to 1.0.2

Posted: Tue Oct 03, 2006 3:43 pm
by chris..
When I tried the .htaccess file, I was allowed up to 32M.
If I read well, by default I have 20971520 bytes and the module need 801304 bytes. It has to be good. Or did I miss something ?

Re: Fatal error after upgrade to 1.0.2

Posted: Tue Oct 03, 2006 5:23 pm
by Dee
No, the maximum of 20971520 was reached while PHP was trying to allocate 45840 bytes and 801304 bytes respectively (so it wasn't allocated).
.htaccess directives may not be used, you can check the actual memory limit using PHP's phpinfo() function. Simply add

Code: Select all

phpinfo();
in a User Defined Tag and include it on a page.
It may also be possible to raise memory_limit with ini_set (see also http://forum.cmsmadesimple.org/index.ph ... l#msg37375) by adding

Code: Select all

ini_set('memory_limit','32M');
at the top of include.php

Re: Fatal error after upgrade to 1.0.2

Posted: Tue Oct 03, 2006 5:47 pm
by chris..
Thanx for the light ! I understand a lil' better now.

It works with ini_set (don't know if my webhost will appreciate), but there's still a bug with my galleries (module : Album). The first shows (in admin panel) every thumbs -17 pictures-, but the second one shows nothing -29 pictures. when I look at the source code, I still get this fatal error.

Is it normal that Album module pump such ressources ? <-- And is it an English sentence ? (I'm a native French speaker).

Maybe should I open another post for that.