|
Posted by rf on March 5, 2009, 5:56 am
Please log in for more thread options
Bill H wrote:
show/hide quoted text
>>>> Hi All,
>>>> I have a page for registering where I want to have a captcha.
>>>> I put the img on the form but he only thing I see is a black box
>>>> without any letters on it.
>>>> Marco
>>> Hi Marco,
>>> Perhaps your font files are not there. When I first ran this script
>>> I got this error:
>>> Warning: imagettftext() [function.imagettftext]: Could not find/open
>>> font in /usr/local/www/apache22/data/missilesilo/david/Captcha.php
>>> on line 53
>>> I copied arial.ttf into the same directory that I ran the script
>>> from, and I changed $aFonts:
>>> $aFonts = array('arial.ttf','arial.ttf','arial.ttf','arial.ttf');
>>> I now see colored letters instead of a black box. Hope this helps.
>>> -David
>> David,
>> The problem is not really the captcha code because I can also see the
>> image when I run it as a seperate php form.
>> However in my form as posted I can only see a black screen with no
>> letters.
>> Marco- Hide quoted text -
>> - Show quoted text -
> Marco
> completely not php, remove this:
> body {
> color: #000000;
> }
> from your code and it will not be a black screen
Er, how would removing the CSS rule setting the colour of the text on the
page to black possibly affect the colour of a captcha, the latter being an
image?
|
|
Posted by =?ISO-8859-1?Q?=22=C1lvaro_G=2 on March 5, 2009, 6:25 am
Please log in for more thread options
Co escribió:
show/hide quoted text
> I have a page for registering where I want to have a captcha.
> I put the img on the form but he only thing I see is a black box
> without any letters on it.
Works for me.
Enable full error reporting and debug the image generation code
separately; i.e., write a simple three-line test script that generates a
fixed image, so you can figure out whether your version of the GD and
related libraries support the features you use.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com -- Mi web de humor al baño María: http://www.demogracia.com --
|
|
Posted by Co on March 5, 2009, 7:30 am
Please log in for more thread options On 5 mrt, 12:25, "=C1lvaro G. Vicario"
show/hide quoted text
> Co escribi=F3:
> > I have a page for registering where I want to have a captcha.
> > I put the img on the form but he only thing I see is a black box
> > without any letters on it.
> Works for me.
> Enable full error reporting and debug the image generation code
> separately; i.e., write a simple three-line test script that generates a
> fixed image, so you can figure out whether your version of the GD and
> related libraries support the features you use.
> --
> --http://alvaro.es- =C1lvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programaci=F3n web:http://bits.demogracia.com
> -- Mi web de humor al ba=F1o Mar=EDa:http://www.demogracia.com
> --
Do you mean that you got it working with exactly the code that I
posted?
Marco
|
|
Posted by =?ISO-8859-1?Q?=22=C1lvaro_G=2 on March 5, 2009, 8:23 am
Please log in for more thread options Co escribió:
show/hide quoted text
>>> I have a page for registering where I want to have a captcha.
>>> I put the img on the form but he only thing I see is a black box
>>> without any letters on it.
>> Works for me.
>> Enable full error reporting and debug the image generation code
>> separately; i.e., write a simple three-line test script that generates a
>> fixed image, so you can figure out whether your version of the GD and
>> related libraries support the features you use.
>
> Do you mean that you got it working with exactly the code that I
> posted?
Yes, I just had to reformat the comments and replace the references to
*.ttf files with files I actually had in my computer.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com -- Mi web de humor al baño María: http://www.demogracia.com --
|
| Similar Threads | Posted | | Poor man's captcha: why wouldn't this work? | September 19, 2006, 8:27 pm |
| What captcha script(s) do you like? | July 15, 2008, 5:31 pm |
| httpclient with captcha | October 31, 2008, 3:42 pm |
| Generating captcha | November 23, 2008, 8:44 pm |
| OT: (sortof) Captcha? | January 21, 2009, 9:46 pm |
| captcha - do you know such solution? | February 21, 2010, 3:01 pm |
| Any good CAPTCHA to recommend? | June 14, 2006, 7:16 pm |
| Formmail + Captcha Verification | September 14, 2007, 10:26 am |
| session start and captcha... | March 8, 2009, 5:15 am |
| session start and captcha... | March 8, 2009, 5:11 am |
|
>>>> I have a page for registering where I want to have a captcha.
>>>> I put the img on the form but he only thing I see is a black box
>>>> without any letters on it.
>>>> Marco
>>> Hi Marco,
>>> Perhaps your font files are not there. When I first ran this script
>>> I got this error:
>>> Warning: imagettftext() [function.imagettftext]: Could not find/open
>>> font in /usr/local/www/apache22/data/missilesilo/david/Captcha.php
>>> on line 53
>>> I copied arial.ttf into the same directory that I ran the script
>>> from, and I changed $aFonts:
>>> $aFonts = array('arial.ttf','arial.ttf','arial.ttf','arial.ttf');
>>> I now see colored letters instead of a black box. Hope this helps.
>>> -David
>> David,
>> The problem is not really the captcha code because I can also see the
>> image when I run it as a seperate php form.
>> However in my form as posted I can only see a black screen with no
>> letters.
>> Marco- Hide quoted text -
>> - Show quoted text -
> Marco
> completely not php, remove this:
> body {
> color: #000000;
> }
> from your code and it will not be a black screen