[pmwiki-users] recipe Captcha can not display image

Esteve Boix eboix at esteveb.com
Sat Apr 7 08:58:17 CDT 2012


Maybe GD is not installed on your server. Try to comment the "header()" 
instruction and see if you get "Cannot initialize new GD image stream" 
when you try to view the image in the browser.

Regards,
Esteve

Al 07/04/12 15:41, En/na Liu Chang ha escrit:
>
> This is recipe is great. However, I meet a problem to show image.
>
> The browser complains: "The image cannot be displayed because it 
> contains error.".
>
> My PHP is able to output text to image, because the following code is 
> running OK.
>
> <?php
> header("Content-type: image/png");
> $im = @imagecreatetruecolor(500, 90)
>                or die("Cannot Initialize new GD image stream");
> $text_color = imagecolorallocate($im, 233, 104, 191);
> imagestring($im, 5, 5, 5,  "A Simple Text String, Oh yeah!", $text_color);
> imagepng($im);
> imagedestroy($im);
> ?>
>
> This is the output.
>
> I cannot figure out the problem of this recipe, but an image for 
> CAPTCHA is essential. Anyone could help?
>
> Thanks
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20120407/0189d8e3/attachment.html>


More information about the pmwiki-users mailing list