MyBB Community Forums

Full Version: Captcha image not showing up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Your captcha image, when looked at with a hex editor looks like this:

00000000  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 89 50 4e 47 0d  |............PNG.|
00000010  0a 1a 0a 00 00 00 0d 49  48 44 52 00 00 00 c8 00  |.......IHDR.....|
00000020  00 00 3c 08 02 00 00 00  ac 39 62 c6 00 00 20 00  |..<......9b... .|
...

So it starts with lots of 0a (newlines) before the PNG header. It should start with PNG.

So you are hunting for some PHP file somewhere (can be anything, including your config.php, a language file, or a plugin), that causes several newlines of output before the actual contents start.

PHP unfortunately is a nasty language like that. Designed to be embedded in HTML, it prints out anything that is outside <?php ?> without any error message whatsoever, even if it's just whitespace. It does not break HTML but it breaks output of binary files such as images like the captcha.

So make sure your files start with <?php and end with ?> without any newlines before or after that.

There's a debug plugin called dirwalk around here somewhere that checks all files for that.
http://community.mybb.com/thread-47354-p...#pid347635
Pages: 1 2