Advertisement:

Author Topic: Fatal error: Allowed memory size of 262144 bytes exhausted  (Read 684 times)

legtech

  • Newbie
  • *
  • Posts: 19
Dear Forum Users,

I was using website perfectly last week, did not install anything or tweak anything. However, on Saturday I could not log into the back office, due to Fatal Error on exhausted memory. The site itself (front end) would load only the error message, but not the theme or engine :(

The error line is:

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in /home/legtech/KERWEN/kerwen.tk/index.php on line 89

I have looked to that line in index.php:

                                require_once(osc_lib_path() . 'osclass/controller/user.php');
                                $do = new CWebUser();
                                $do->doModel();

It sure refers to some directory, but I cannot see where that directory is. Could you please help me in resolving this issue, since I have absolutely no understanding of what it means.


Aficionado

  • Guest
Re: Fatal error: Allowed memory size of 262144 bytes exhausted
« Reply #1 on: March 28, 2016, 05:27:30 pm »
You need at least 64 MB to run Osclass. Now (if i read it correctly) you allow 256 KB (.25 mb).

NOTHING can run with 256 kb !!

Maybe a typo in your htaccess or other file ?

pecke

  • Full Member
  • ***
  • Posts: 169
Re: Fatal error: Allowed memory size of 262144 bytes exhausted
« Reply #2 on: March 28, 2016, 11:55:02 pm »
if you can edit php.ini    sometimes  you can solve error with little change

replace
 memory_limit = 512MB

 with
memory_limit = 536870912

legtech

  • Newbie
  • *
  • Posts: 19
Re: Fatal error: Allowed memory size of 262144 bytes exhausted
« Reply #3 on: March 29, 2016, 08:16:26 am »
Thanks pecke and Aficionado,

I have resolved the problem with help of stackoverflow. As pecke said, I have edited the php.ini file, previously it had memory_limit = 900, and I thought it will be read as megabytes, but PHP seems to treat it like bytes, therefore, I just converted the value of 900MB into bytes and inserted it into the line.

I hope the above will help if someone else will be facing similar problem.

Thanks again for the support! I really appreciate all the help I am getting from you folks!