Error displaying simple captcha
#27
Closed
opened 7 years ago by loskiq
·
7 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
What to do?
Seems like the font isn't being loaded properly or there is some issue with GD. Do you have access to PHP's error log? It might explain what the issue is. Just in case it is the font, ensure that PHP has permission to read the files in inc/fonts/
@tslocum log:
\nWarning: No such file or directory in /var/www/b/inc/captcha.php on line 314
\nWarning: Invalid font filename roboto_regular.ttf in /var/www/b/inc/captcha.php on line 314
\nWarning: No such file or directory in /var/www/b/inc/captcha.php on line 318
\nWarning: Invalid font filename roboto_regular.ttf in /var/www/b/inc/captcha.php on line 318
Try changing this line to
putenv('GDFONTPATH=' . realpath(dirname(__FILE__)) . '/fonts/');
Did not help. I installed php on hhvm. Maybe that's the problem?
Above that line add
echo realpath(dirname(__FILE__)) . '/fonts/';die();
If the path is correct your permissions must be at fault.
/var/www/b/inc/fonts/
The path to the correct folder.
/var/www/b/inc/fonts/roboto_bold.ttf
/var/www/b/inc/fonts/roboto_regular.ttf
There are fonts
Thanks for checking. Since the correct font path is used the only explanation which comes to my mind is that PHP doesn't have permission to read these files.