title: Captcha not working in CI
body: <p>I wrote a small piece of code which should work for a captcha in Codeigniter. The code should just simply print the time the captcha was created, for a first try. But it doesn't seem to even create the captcha itself. I'm sure the helper is loaded, this is done in the construct function. Next to that, the correct rights for writing the image to a folder should be there. Anyone any idea why it isn't working as it should?</p>
  
  <pre><code>defined('BASEPATH') OR exit('No direct script access allowed');
  class Register extends CI_Controller{
  
       public function __construct(){
          parent::__construct();  
          $this-&gt;load-&gt;helper('captcha');
      }
  
      public function generate_captcha(){
          $vals = array(
              'img_path' =&gt; './captcha/',
              'img_url' =&gt; base_url().'captcha/',
          );
          echo base_url().'assets/images/captcha/';
          $captcha = create_captcha($vals);
  
          echo 'cap time: ' . $captcha['time'];
  
          $captcha_image = $captcha['image'];
          return $captcha_image; 
      }
  
  }
  </code></pre>
  
  <p><strong>Edit</strong>
  Could it have anything to do with something apart from this code? I already set the correct rights to the folder, so it can write images to the directory.</p>