Welcome Guest, Not a member yet? Register   Sign In
Captcha problem here
#1

[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
#2

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




Theme © iAndrew 2016 - Forum software by © MyBB