Installation struggles - debian, no captcha image with php5

Harri Nyman hny at ntek.tk
Fri Sep 8 19:37:23 UTC 2006


Jonathan Daugherty wrote:
> # Check out yourself - http://auth.ntek.tk and from there obiviously
> # registration. For some reason I cannot get imagepng working either,
> # but I'm checking into that right now.
> 
> Ah, I see.  If you look at the image directly, you'll notice that it
> *is* producing a JPEG; the problem, however, is due to the code not
> finding the specified font properly.  This is probably because the
> PHP_SERVER_PATH is not correct; can you modify a file to print the
> value of that define?

Gotcha! :D
Fonts directory was misdefined - I did not use any kind of symlinking, 
just copied everything to my virtual server and of course missed this 
definition in render.php - this directory should imho be defined in 
config.php, not every install is identical, and I am quite certain this 
will pop up as a problem in future too.

Here is what I changed:

     // Render a captcha image and store the hash.  See register.tpl.
     $hash = generateCaptcha("./fonts/FreeSans.ttf", 6);

Call to generateCaptha now has proper directory and everything seems to 
be in working order to proceed.... hopefully

Thanks for your help! Now.. back to implementing authentication to 
various projects I'm working on... ;)

Harri
http://www.ntektechnologies.com



More information about the general mailing list