php - Allowed memory size error in magento -


i have create php file name "category-set.php" , call in magento admin panel under iframe. when open file using admin panel generate error --- fatal error: allowed memory size of 1073741824 bytes exhausted (tried allocate 268435476 bytes) in /var/www/html/category-set.php on line 111. have set memory_limit = 1024m in php.ini file, problem not solved. please me.

edit

<?php function res($cur_category,$s){         $children_categories = mage::getmodel('catalog/category')->getcategories($cur_category->getid());         $s.= $s;         foreach($children_categories $child){              //$childcat = mage::getmodel('catalog/category')->load($child->getid());              $name = $child->getname();                 $option.='<option value="'.$child->getid().'">' .$s .$child->getname(). "</option>";             //$option.=res($childcat,$s);         $option.=res($child,$s);         }     unset($children_categories);         return $option; } function gettree(){     $rootcatid= mage::app()->getstore()->getrootcategoryid();     $categories = mage::getmodel('catalog/category')->getcategories($rootcatid);     $option='<option value="">--select category--</option>';     foreach($categories $category)      {            //$cat = mage::getmodel('catalog/category')->load($category->getid());         $option.='<option value="'.$category->getid().'">'.$category->getname()."</option>";         if($category->haschildren()){             //$option.= res($cat,'-');         $option.= res($category,'-');         }     }     unset($categories);     return $option; }  $select = '<select name="store_category[]">'.gettree().'</select>'; ?> 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -