Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal error: Allowed memory
#1
I am trying to resolve this issue it is appearing in


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1302730 bytes) in beta/admin/inc/template_functions.php on line 913

I have tried to update the memory size and its up now, but still having this error...

Thanks for your time and help.

One more issue with in this forum is search not working, I searched for "Fatal error: Allowed memory" and then "Allowed memory" both returned 0 results while there is a post.

http://get-simple.info/forum/topic/3153/...xml-files/
Reply
#2
The forum software was recently updated it seems to be having issues.

What version of GS are you on ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Thanks Shawn.

It is 3.0
Reply
#4
justnajm Wrote:Thanks Shawn.

It is 3.0

hmm i recall an infinite loop condition being fixed in 3.1 I think.
Perhaps site map creation or something.
Ill have to go back to that version and look at that code line to be sure.

When does it do this error ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
Thanks for the suggestions Smile

I receive this when:

Successfully login as admin.

Client Site is working fine but back-end having this issue.
Reply
#6
Thanks alot shawn Smile

I really appreciate your help and efforts.

I have figured out the problem myself, I had some xml files of size zero(0) in my data/pages/ directory.

And getsimple needs xml data in every file. even if it has no content.

I replaced them with the xml format getsimple required and its done.

if you want to keep "zero" size files in the directory then this will help:

replace the function with your function in template_functions.php

Code:
function get_pages_menu_dropdown($parentitem, $menu,$level) {
    
    global $pagesSorted;
    global $parent;
    
    $items=array();
    foreach ($pagesSorted as $page) {
        if ($page['parent']==$parentitem){
            $items[(string)$page['url']]=$page;
        }    
    }    
    if (count($items)>0){
        foreach ($items as $page) {
            // my code is in the next line only
              if($page->parent==null&&$page->sort==null&&$page->url==null) continue;
              $dash="";
              if ($page['parent'] != '') {
                  $page['parent'] = $page['parent']."/";
              }
            for ($i=0;$i<=$level-1;$i++){
                if ($i!=$level-1){
                      $dash .= '<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
                } else {
                    $dash .= '<span>&nbsp;&nbsp;&ndash;&nbsp;&nbsp;&nbsp;</span>';
                }
            }
            if ($parent == (string)$page['url']) { $sel="selected"; } else { $sel=""; }
            $menu .= '<option '.$sel.' value="'.$page['url'] .'" >'.$dash.$page['url'].'</option>';
            $menu = get_pages_menu_dropdown((string)$page['url'], $menu,$level+1);          
        }
    }
    return $menu;
}
Reply
#7
justnajm Wrote:Thanks alot shawn Smile

I really appreciate your help and efforts.

I have figured out the problem myself, I had some xml files of size zero(0) in my data/pages/ directory.

And getsimple needs xml data in every file. even if it has no content.

I replaced them with the xml format getsimple required and its done.

if you want to keep "zero" size files in the directory then this will help:

replace the function with your function in template_functions.php

Code:
function get_pages_menu_dropdown($parentitem, $menu,$level) {
    
    global $pagesSorted;
    global $parent;
    
    $items=array();
    foreach ($pagesSorted as $page) {
        if ($page['parent']==$parentitem){
            $items[(string)$page['url']]=$page;
        }    
    }    
    if (count($items)>0){
        foreach ($items as $page) {
            // my code is in the next line only
              if($page->parent==null&&$page->sort==null&&$page->url==null) continue;
              $dash="";
              if ($page['parent'] != '') {
                  $page['parent'] = $page['parent']."/";
              }
            for ($i=0;$i<=$level-1;$i++){
                if ($i!=$level-1){
                      $dash .= '<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
                } else {
                    $dash .= '<span>&nbsp;&nbsp;&ndash;&nbsp;&nbsp;&nbsp;</span>';
                }
            }
            if ($parent == (string)$page['url']) { $sel="selected"; } else { $sel=""; }
            $menu .= '<option '.$sel.' value="'.$page['url'] .'" >'.$dash.$page['url'].'</option>';
            $menu = get_pages_menu_dropdown((string)$page['url'], $menu,$level+1);          
        }
    }
    return $menu;
}


I wonder if this is fixed on 3.1.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)