CodeIgniter Forums
captcha helper issue on live server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: Issues (https://forum.codeigniter.com/forum-19.html)
+--- Thread: captcha helper issue on live server (/thread-61813.html)



captcha helper issue on live server - rejoan - 05-20-2015

Hi,
Captcha Helper "font_path" not working on live server. In line number 195 at captcha_helper.php file_exists($font_path) used in if condition.

This function always returning "FALSE" on live server. Locally working nicely.

Server:
CentOS

Following are tested still not working:

PHP Code:
$vals = array(
    
'img_path' => './captcha/',
    
'img_url' => base_url('captcha'),
    
'font_path' => $_SERVER['DOCUMENT_ROOT'].'/assets/fonts/ALGER.ttf',
.... 

and

PHP Code:
$vals = array(
    
'img_path' => './captcha/',
    
'img_url' => base_url('captcha'),
    
'font_path' => './assets/fonts/ALGER.ttf',
.... 

and

PHP Code:
$vals = array(
    
'img_path' => './captcha/',
    
'img_url' => base_url('captcha'),
    
'font_path' => FCPATH.'assets/fonts/ALGER.ttf',
.... 

and

PHP Code:
$vals = array(
    
'img_path' => './captcha/',
    
'img_url' => base_url('captcha'),
    
'font_path' => getcwd().'assets/fonts/ALGER.ttf',
.... 

and finally

PHP Code:
$vals = array(
    
'img_path' => './captcha/',
    
'img_url' => base_url('captcha'),
    
'font_path' => base_url('assets/fonts/ALGER.ttf'),
.... 

Now any idea?


RE: captcha helper issue on live server - gadelat - 05-20-2015

are file permissions correctly set?


RE: captcha helper issue on live server - rejoan - 05-20-2015

(05-20-2015, 04:16 AM)gadelat Wrote: are file permissions correctly set?

file permission even directory 0777


RE: captcha helper issue on live server - rejoan - 05-20-2015

PROBLEM SOLVED.
Filename should have "ALGER.TTF" but i used "ALGER.ttf"