CodeIgniter Forums
Captcha doest work on Linux Ubuntu 16.04 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Captcha doest work on Linux Ubuntu 16.04 (/thread-72400.html)



Captcha doest work on Linux Ubuntu 16.04 - qwertyuiop - 12-14-2018

Hi guys,
Why the captcha doest work on Ubuntu Linux, I followed exactly like the User guide and even try to watch some videos from youtube, I followed exactly like they did and I also already create the captcha directory on the root directory CI.
But still doest work? What should I do? Pls help.. Thanks a lot

Here is my controller  script:

public function index()
    {
        $this->load->helper('captcha');

        $vals = array(
                    'img_path'        =>    './captcha/',
                    'img_url'        =>    base_url().'captcha/',
                    'expiration'    => 7200,
                    'word_length'    => 8,
                    'font_size'        => 22
        );
        $cap = create_captcha($vals);
        $data['captcha'] = $cap['image'];

        $this->load->view('index', $data);
    }

And this is the views:

                   <div class="form-group">
                        <div class="col-md-5 col-md-offset-2">
                            <?php echo $captcha; ?>
                        </div>
                        <div class="col-md-5">
                            <a href="javascript:;"><i class="glyphicon glyphicon-refresh"></i>REFRESH CAPTCHA</a>
                        </div>
                    </div>

I will appreciate your helps... Thanks


RE: Captcha doest work on Linux Ubuntu 16.04 - Camp1 - 01-07-2019

Is base_url correct? I recommend you use recaptcha2 better than CI captcha.


RE: Captcha doest work on Linux Ubuntu 16.04 - Codehoster - 08-24-2019

(01-07-2019, 05:17 PM)Camp1 Wrote: Is base_url correct? I recommend you use recaptcha2 better than CI captcha.

I recommend Google Captcha V3. It's safer than codeigniters!


RE: Captcha doest work on Linux Ubuntu 16.04 - InsiteFX - 08-24-2019

Just a note to new users of CodeIgniter.

PHP Code:
base_url().'something';

can be written like this like a method.

base_url('something'); 

It looks cleaner like that.