[pmwiki-users] recipe Captcha can not display image

Liu Chang toliuch at gmail.com
Sat Apr 7 22:08:32 CDT 2012


Oh, yes, it really matters!

I carefully checked the error image, and found there are 3 bytes in the
file header, which are the BOM of UTF-8.

Then I searched all php files with the following command and found the
config.php was transferred to UTF-8 with BOM:

grep -r -P "\xef\xbb\xbf" * --include=*.php

The reason why I transferred the config file is I wanted to customize the
title with my site's Chinese name.

It's finally fixed after 1 week. Thank you very much!

Best Regards,
Liu Chang

On Sun, Apr 8, 2012 at 8:42 AM, Petko Yotov <5ko at 5ko.fr> wrote:

> On Saturday 07 April 2012 21:41:16 Liu Chang wrote:
> > 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.
> This may happen when some spaces are output before or after the picture
> code.
> For this reason, it is recommended that all PHP files
> * start with the marker <?php as very first thing on the first line
> * don't include a closing ?> marker which is btw not required
> * are saved "without byte order mask (BOM)" by your text editor
> Petko
> _______________________________________________
> 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/20120408/562011de/attachment.html>

More information about the pmwiki-users mailing list