Thank you Andrew.
I downloaded the current captcha.php
file and it appears to be the same as
the one I am using. In the functions
file, captcha.php uses random_text function,
which also appears to be the same as I
am using. Your code should be the
same as mine, and mine is working.
Just to make sure, I did another test;
I replaced my existing captcha.php and
functions.php with these downloaded files.
It worked for me, I was able to see the
captcha image. I was sure to clear temporary
Internet files and cache.
I am wondering if it might have something
to do with system configuration.
I am using
UNIX 4.10-RELEASE FreeBSD
PHP version 5.2.14
At this point, a good test might be to see
if imagepng can write to a file.
Change the imagepng statement, around line 38, to
PHP Code:
imagepng($image,'myfile.png');
Browse to register.php
Then go to the public_files/img directory
and see if
myfile.png is there.
If it is, see if it will display in the browser
http://mydomain/myapp/public_files/img/myfile.png
Be sure to change that line back again.
If it does display correctly,
then you would have to look at issues around imagepng.
The imagepng function writes to a temporary file which
gets sent to the browser. Perhaps Php does not
have permission to write to the temporary file
or something like that. There is a lot of discussion
about this type of problem on the net.
If it does not display correctly, then you'd
need to go through your code line by line and
see where it is not working.
You may have already done this test,
but I thought I'd post it here anyway
in case anyone else may be interested.
Let us know what happens. Thanks.