When you call the controller upload anywhere, it hangs and gives an error
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 65488 bytes) in D: \ XAMPP \ htdocs \ Symfony \ web \ system \ core \ Log.php on line 478
The edit method in my controller:
function edit($id){ $this->action ="edit"; if (empty($_POST["id"])) $_POST["id"] = $id; if(isset($_POST['edit'])){ $_POST['image'] = $this->model_img_upload->imageUpload($this->imUploadConfig); if($this->model_akcii->edit_data($_POST)){ $this->session->set_flashdata('msg',$this->lang->line('msg_edit')); redirect('akcii'); } } $this->item = $this->model_akcii->get_info($id); $this->item_lang = $this->model_akcii->get_lang_info($id); $this->load->view("edit",$this); } imageUpload method:
function imageUpload ($config=array()){ if(isset($_FILES['userfile'])){ $_FILES['userfile']['name'] = $this->transliterate($_FILES['userfile']['name']); $config['upload_path'] = isset($config['upload_path'])?$config['upload_path']:$_SERVER['DOCUMENT_ROOT'].'/userfiles/images/' ; if (!file_exists($config['upload_path'])) if (phpversion() >= 5) mkdir($config['upload_path'],0755,true); else { $paths = split("/",$config['upload_path']); $makepath=""; foreach ($paths as $p){ $makepath .=$p."/"; if (!file_exists($makepath)) mkdir($makepath,0755); } } $config['allowed_types'] = isset($config['allowed_types'])?$config['allowed_types']:'jpg|gif|png' ; $config['max_size'] = isset($config['max_size'])?$config['max_size']:'1000' ; $config['max_width'] = isset($config['max_width'])?$config['max_width']:'2048' ; $config['max_height'] = isset($config['max_height'])?$config['max_height']:'2048' ; $this->load->library('upload', $config); if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); return false; } else { $imgdata = $this->upload->data(); $config['image_library'] = 'GD2' ; $config['source_image'] = $imgdata['full_path']; $config['quality'] = isset($config['quality'])?$config['quality']:"100%" ; $config['create_thumb'] = isset($config['create_thumb'])?$config['create_thumb']:TRUE ; $config['maintain_ratio'] = isset($config['maintain_ratio'])?$config['maintain_ratio']:TRUE ; $config['width'] = isset($config['width'])?$config['width']:140 ; $config['height'] = isset($config['height'])?$config['height']:115 ; $this->load->library('image_lib', $config); $this->image_lib->resize(); return $imgdata['file_name']; } } On the version of codeigniter 1.x, everything worked, updated to the 3rd version, and started issuing this error. In the documentation - no changes in this controller. Help me to understand