The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Having recently had spam problems on forms, I found a php routine by Ralph on h**p://www.stadtaus.com/ which does a Turing test with a Captcha image as a means of improving protection from spambots.
Does Freeola support Freetype and GD2 library? These two functions being required for the script to run.
When I run the script I get the error message "Captcha image could not be generated" I have tried changing the chmod of all relevant directories to 777 and ensuring ttf's get uploaded in binary, but to no avail.
If any Freeola staff read this, maybe its worthwhile noting in PHP Essentials in the support section that DOCUMENT_ROOT isnt set to what people might expect.
Putting a direct font path worked a treat.
folkie
Open up inc/formmail.inc.php and scroll down to the configuration bit. Make sure $configuration['captcha_image']=true; (rather than false). and the line below it
reads
$configuration['captcha_font_path'] = getenv('DOCUMENT_ROOT') . dirname($_SERVER['PHP_SELF']) . '/inc/font/';
try changing it to
$configuration['captcha_font_path']= '
Its possible that getenv('DOCUMENT_ROOT') isnt reporting the correct path hence it cant find the font.
EDIT: Now that the problem has been resolved, I've removed the absolute path to Folkie's webspace.
I tried what you suggested. Seems to enable diagnostics that probably means a lot to some people viz:-
object(pear_error)(8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> NULL ["message"]=> string(46) "Error initializing Image_Text (font missing?!)" ["userinfo"]=> NULL ["backtrace"]=> array(5) { [0]=> array(6) { ["file"]=> string(58) ......
you'll get the full output if you click my link below. I suspect there is nothing much wrong with the script, the problem is in my implementation of same. I will study the documentation files a bit more, then if I still don't see the light I'll mail Ralf Stadtaus who wrote it.
Thanks again for looking anyway,
folkie.
One thing you might try is open inc/captcha.inc.php and search for var_dump($retval); its been commented out (remove the //) and see what it produces.
> Well, if I can provide a direct link to what you've used I can
> take a look if you'd like.
Thank's for that,
To test the script I have left error checking enabled.
folkie
>
> One other possibility is that its referring to library in
> some other context, it might want the pear gd libraries for
> instance. Difficult to assert without seeing it.
Thanks for your help.
I did not wish to consult the script's author, before ensuring that the problem wasn't that the Freeola server did not support these functions.
folkie
> However, I can see no reference to Library under the GD header,
> so I am still unsure if the "GD2 library" is
> supported?
The fact that GD is listed means that the library is present. Its version 2 (ie GD2) as well. So it appears to have some other problem, not alot you can do other than look at the code and try to see where its failing.
EDIT: One other possibility is that its referring to library in some other context, it might want the pear gd libraries for instance. Difficult to assert without seeing it.
Quote:
"So if you look for GD you can see what version it is and whether it has FreeType support enabled."
I have done as you asked and it indicated FreeType support
GD Version bundled (2.0.23 compatible)
FreeType Support enabled
However, I can see no reference to Library under the GD header, so I am still unsure if the "GD2 library" is supported?
Regards, folkie