Hello. I’m in a bit of a pickle right now. I’m currently using an Ubuntu Linux distribution. I’m trying to make a captcha system, but the image keeps on returning blank. I looked into the error logs of my web server, and the error logs say, “PHP message: PHP warning: imagettftext( ): Could not find/open font in (not comfortable sharing directory) on line 23”. Here is part of my code:
$dir = ‘Computer/usr/share/fonts/truetype/28DaysLater.ttf’ ;
imagettftext($image, {number}, {number}, {number}, {number}, $color, $dir, $_SESSION[‘captcha_code’]) ;
By the way, the {number} parts are parts that I feel somewhat insecure sharing and are also parts that I think are unimportant. I don’t think that there are any other bits of my code that are important to know, although please let me know if there’s any specific information or code that I can provide you. Anyway, I don’t know why I keep on getting this error and an empty captcha. Can somebody please give me some advice on how to solve this problem, like any downloads to make or any typing mistakes I may have made?
$dir = ‘Computer/usr/share/fonts/truetype/28DaysLater.ttf’ ;
imagettftext($image, {number}, {number}, {number}, {number}, $color, $dir, $_SESSION[‘captcha_code’]) ;
By the way, the {number} parts are parts that I feel somewhat insecure sharing and are also parts that I think are unimportant. I don’t think that there are any other bits of my code that are important to know, although please let me know if there’s any specific information or code that I can provide you. Anyway, I don’t know why I keep on getting this error and an empty captcha. Can somebody please give me some advice on how to solve this problem, like any downloads to make or any typing mistakes I may have made?