Welcome Guest, Not a member yet? Register   Sign In
codeigniter captcha Allowed memory
#11

(06-30-2017, 01:07 PM)pippuccio76 Wrote:
(06-30-2017, 12:54 PM)InsiteFX Wrote: There should not be a loop it only shows one image at a time.

I would read the Documentation more.

this is the page with the code :

http://lemuria.altervista.org/user_codei...ha_setting

the code in this page are only :

Code:
<?php

echo $image;


?>

codeigniter version?
Reply
#12

(06-30-2017, 10:36 PM)Paradinight Wrote:
(06-30-2017, 01:07 PM)pippuccio76 Wrote:
(06-30-2017, 12:54 PM)InsiteFX Wrote: There should not be a loop it only shows one image at a time.

I would read the Documentation more.

this is the page with the code :

http://lemuria.altervista.org/user_codei...ha_setting

the code in this page are only :

Code:
<?php

echo $image;


?>

codeigniter version?

3.1.4
Reply
#13

(06-30-2017, 12:20 PM)pippuccio76 Wrote:
(06-30-2017, 10:18 AM)Paradinight Wrote:
(06-30-2017, 09:20 AM)pippuccio76 Wrote:
(06-30-2017, 04:23 AM)InsiteFX Wrote: php.ini

Try changing these:

memory_limit=256M

For Forms / upload/download:
These two settings should be set to the same amount.

post_max_size=16M
and
upload_max_filesize=16M

Ther'isnt a problem of memory , this appear because ther's something  as a loop wich save image until the memory_limit are reached, the problem is why ?

show us the code.

the code is on the first post :

Code:
// This function generates CAPTCHA image and store in "image folder".
     public function captcha_setting(){
       
      $this->load->helper('captcha');

       
       $vals = array(
           'img_path' => './captcha/',
           'img_url' => base_url().'captcha/',
       );
       
       
        $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);
     }

this is capcha_view:

Code:
<?php

echo $image;


?>

in the folder captcha there are more than 100 image created in one minute

Do you know about recursion?

In you method captcha_setting() you call $this->captcha_setting();

remove the line and you memory problem is solved

sorry i oversee it :/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB