CodeIgniter Forums
Captcha problem here - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Captcha problem here (/showthread.php?tid=58270)



Captcha problem here - El Forum - 05-29-2013

[eluser]jairoh_[/eluser]
I really had no problem in captcha when i was in windows, but when i use the same code in linux it won't show up. I mean it won't even create the captcha. But it's not showing any error. and here are my codes.

controller:
Code:
function index () {
  $vals = array (
   'img_path' => './captcha/',
   'img_url' => base_url() . 'captcha/',
   'img_width' => 150,
   'img_height' => 30);
  $cap = create_captcha( $vals );

  $this->session->set_userdata( 'captcha_key', $cap [ 'word' ]  );
  
  $data [ 'captcha' ] = $cap [ 'image' ];

  print_r( $data );
  //load view
  $this->load->view( 'comments_view', $data );
  
}
}

view:
Code:
Captcha code: <?php echo $captcha; ?>
<?php
$data_form = array(
  'name' => 'captcha'
);
echo $this->session->userdata( 'captcha' );

?>

and my php info about the gd library:
[Image: phpinfo.png]

anyone. please feel free to help. tnx



Captcha problem here - El Forum - 05-29-2013

[eluser]jairoh_[/eluser]
problem solved. it's just a matter of folder permission. Big Grin