(06-25-2017, 08:34 AM)Paradinight Wrote: (06-25-2017, 07:16 AM)pippuccio76 Wrote: Hi , im tryng to insert captcha in registration , this is my simple controller method :
Code:
public function captcha_setting(){
$this->load->helper('captcha');
$vals = array(
'img_path' => '.images/',
'img_url' => base_url().'images/',
);
$data = create_captcha($vals);
$_SESSION['captchaWord'] = $data['word'];
$this->captcha_setting();
// image will store in "$data['image']" index and its send on view page
$this->load->view('captcha_view', $data);
}
If i visit the page captcha_view :
Code:
<?php
echo $image;
?>
I have this error :
Message: Allowed memory size of 268435456 bytes exhausted (tried to allocate 65484 bytes)
php has a memory limit. you used too much. it has nothing to do with the captcha 
change the allowed memory in php.ini (memory_limit) or unset unnecessary arrays
Sorry but ther'is another problem , several image are saved until i have this problem (instead one image ) . i think this is the problem , but howcan i solve ?