title: create_captcha - function returns false - Codeigniter
body: <p>This is my directory structure:</p>
  
  <p><a href="https://i.stack.imgur.com/bjLD8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bjLD8.jpg" alt="enter image description here"></a></p>
  
  <p>My code is the following:</p>
  
  <pre><code>$data['msg'] = $msg ;
  
  $this-&gt;load-&gt;helper('captcha');
  
  $captcha = array(
      'word' =&gt; rand(9999,99999),
      'img_path'  =&gt; './captcha/',
      'img_url'   =&gt; base_url().'/captcha/',
      'font_path' =&gt;  './captcha/font.ttf',
      'img_width' =&gt; '130',
      'img_height'=&gt; 50,
      'expiration'=&gt; 5800
  );
  
  $cap = create_captcha($captcha);
  $data['image'] = $cap['image'] ;
  echo var_dump($cap);
  return;
  </code></pre>
  
  <p>but my output returns <code>bool(false)</code>.</p>