Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I add fonts into the correct fonts folder (sites/all/modules/captcha/image_captcha/fonts). Captcha admin sees them and offers me a select list. I choose one and submit. In FF I get no image at all, in IE I actually get the red cross broken image icon.
What is the problem here? The path is right. Is it the type of font I'm using. I even uploaded a well-known font such as arial.ttf and still nothing. I have 5 fonts uploaded and get the same issue with all of them.
Comment | File | Size | Author |
---|---|---|---|
#11 | requirements_2.patch | 1.85 KB | soxofaan |
#10 | requirements_1.patch | 1.85 KB | soxofaan |
Comments
Comment #1
soxofaan CreditAttribution: soxofaan commentedAre there any related error entries in your drupal log (?q=admin/logs/watchdog) ?
I guess your PHP version has GD library (http://be.php.net/gd) support?
what does ?q=admin/logs/status say about GD library?
Comment #2
esllou CreditAttribution: esllou commentedHi,
there are no errors in the watchdog list. Our PHP version is 5.2.1. There isn't anything about GD library on the Status Report page:
just php version and this:
Unicode library Standard PHP
Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.
isn't that something else? I am running a pretty standard 5.2 installation (on a dedicated server, which might mean something is missing).
Comment #3
esllou CreditAttribution: esllou commentedI've read up a little on the GD library and it seems to suggest that if it were missing, I wouldn't have the image captcha working at all, whereas it does seem to be working...only not with the additional tff fonts. It works fine with the default "built in font", just that the letters come out looking very small and I thought about using a custom font to increase them.
Comment #4
soxofaan CreditAttribution: soxofaan commentedThat's weird. You don't have the GD library enabled, but you still can generate images with the built in font?
could you execute the following php on your server, for example by creating a new page with the "PHP code" input format:
and post the result?
Comment #5
soxofaan CreditAttribution: soxofaan commentedMy mistake, this is probably not true. Apparently the color module needs to be enabled to get GD information listed on the status report. I assumed GD info was listed by default.
Comment #6
esllou CreditAttribution: esllou commentedHere is what I got:
does that help to explain why I can't use those extra ttf fonts?
Comment #7
soxofaan CreditAttribution: soxofaan commentedyep, GD library with "FreeType Support" is required for the image captcha, which is not the case for you:
I think we need to add a check during module installation to test this.
Comment #8
esllou CreditAttribution: esllou commentedhow would I resolve that? do I need to download and install GD library from fresh?
Comment #9
soxofaan CreditAttribution: soxofaan commentedI'm not very familiar with that. You seem to suggest that you have root access to the server, is that correct? Otherwise you should ask the server admins/support.
Comment #10
soxofaan CreditAttribution: soxofaan commentedThis patch adds a requirement check to the image CAPTCHA: GD library needed and GD library must support FreeType. If one of these requirements fails, this results in an error on the status report.
It would be nicer to detect this before installing the image CAPTCHA module, but it seems that this is not possible now (in Drupal 5.3): only runtime checks are possible for contributed modules, for core modules also pre-install checks are possible however.
Comment #11
soxofaan CreditAttribution: soxofaan commentedsorry, #10 contains the wrong patch
this one should be better
Comment #12
RobLoachWorking for me!
Comment #13
soxofaan CreditAttribution: soxofaan commentedFor those interested in this issue, I made a bug report out of this: http://drupal.org/node/189312
Comment #14
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.