Error displaying simple captcha #27

Closed
opened 7 years ago by loskiq · 7 comments
loskiq commented 7 years ago (Migrated from gitlab.com)

screenshot-6oct2016-23 36 27

What to do?

![screenshot-6oct2016-23 36 27](https://cloud.githubusercontent.com/assets/22175047/19169583/c82d6234-8c1d-11e6-9656-45da6b53732f.png) What to do?
tslocum commented 7 years ago (Migrated from gitlab.com)

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/

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/
loskiq commented 7 years ago (Migrated from gitlab.com)

@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

@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
tslocum commented 7 years ago (Migrated from gitlab.com)

Try changing this line to putenv('GDFONTPATH=' . realpath(dirname(__FILE__)) . '/fonts/');

Try changing [this line](https://github.com/tslocum/TinyIB/blob/master/inc/captcha.php#L13) to `putenv('GDFONTPATH=' . realpath(dirname(__FILE__)) . '/fonts/');`
loskiq commented 7 years ago (Migrated from gitlab.com)

Did not help. I installed php on hhvm. Maybe that's the problem?

Did not help. I installed php on hhvm. Maybe that's the problem?
tslocum commented 7 years ago (Migrated from gitlab.com)

Above that line add echo realpath(dirname(__FILE__)) . '/fonts/';die();

If the path is correct your permissions must be at fault.

Above that line add `echo realpath(dirname(__FILE__)) . '/fonts/';die();` If the path is correct your permissions must be at fault.
loskiq commented 7 years ago (Migrated from gitlab.com)

/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

/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
tslocum commented 7 years ago (Migrated from gitlab.com)

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.

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.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/tinyib#27
Loading…
There is no content yet.