Topic: Firefox register.php with CAPTCHA issue

G'day all.

Got a bit of a problem. I personally use Internet Explorer so it's no problem, however, the 'customers' use FireFox and they are having a problem.

If you visit this in Firefox 1.0.7:

http://forums.root32.org/register.php

You will notice that it gives that error.

Internet Explorer works fine.

I'm running PunBB 1.2.8.


Cheers.

Re: Firefox register.php with CAPTCHA issue

It's not a PunBB thing, your server seems to be sending this in the request
Content-Type: image/png
You'll have to see what's causing that

3 (edited by Steve Castle 2005-10-11 01:56)

Re: Firefox register.php with CAPTCHA issue

check .htaccess and see whether or not you have php parsing as:

Smartys wrote:

Content-Type: image/png

^^^ What Smartys said...

smile

EDIT:
I am 99% sure that the problem has to do with the CAPTCHA at the bottom of the registration form.
Make sure that your PHP with that is closed properly.

-Steve

Re: Firefox register.php with CAPTCHA issue

I don't think he does, since the other pages work fine

Re: Firefox register.php with CAPTCHA issue

See above edit in my post

-Steve

6

Re: Firefox register.php with CAPTCHA issue

And all Opera shows is a cute little box with the word "Image" inside.

I've changed the name of the topic since its nothing to do with register.php in its normal configuration.

Re: Firefox register.php with CAPTCHA issue

Ahoy. 10 points for guessing who I am.

Ok, here's the lowdown:

1) The image/png header was added by mistake (on the wrong page) - that has now been removed. No difference.
2) The image thing at the bottom doesn't use CAPTCHA (from what I hear, CAPTCHA is not a PHP function/whatever)

... one thing I did find, was several problems with the HTML on these pages. I am only to assume there's some form of XML? I haven't looked around properly, but most of these tags I've never even heard of. The problem could quite possibly lie there.

FireFox and Opera have a track record for not formatting things the same as IE. But yeah, all this works in IE so it's not a server/code error - it's an error in the way the browser/s are handling things.

8 (edited by Steve Castle 2005-10-11 03:31)

Re: Firefox register.php with CAPTCHA issue

Smithers wrote:

2) The image thing at the bottom doesn't use CAPTCHA (from what I hear, CAPTCHA is not a PHP function/whatever)

"CAPTCHA" is an acronym for "completely automated public Turing test to tell computers and humans apart".  It is what is on the registration form on the website in question, but doesn't always have to be programmed in php.  See thr following wikipedia entry for more information

http://en.wikipedia.org/wiki/Captcha

As you can see, there is a lot of programming languages that you can make a CAPTCHA for.

Smithers wrote:

... one thing I did find, was several problems with the HTML on these pages. I am only to assume there's some form of XML? I haven't looked around properly, but most of these tags I've never even heard of. The problem could quite possibly lie there.

Yes, I am in total agreement.  There were a lot of odd tags in the source.  But that's just XHTML.  XHTML = ODD wink

Smithers wrote:

FireFox and Opera have a track record for not formatting things the same as IE. But yeah, all this works in IE so it's not a server/code error - it's an error in the way the browser/s are handling things.

This is also true, but I think it is safe to say that there is something definitely weird/fishy with the image (CAPTCHA) code here.

EDIT:
This image on the server might be why Firefox refuses to show the page correctly:
http://root32.org/in-ie_fuck_firefox_01.gif

wink

-Steve

9

Re: Firefox register.php with CAPTCHA issue

Strange people. All the markup is bog standard xhtml 1 Strict. No XML (in the purest sense) and no funny tags. The only odd markup is that stuff somebody has added in the announcement box and a totally pointless table. Unclosed tags and, I almost can't believe it, tags in uppercase. I guess there has been a time warp and we've gone back to 1998.

Re: Firefox register.php with CAPTCHA issue

I'd love to gog back to 1998.  But I can't - now back to the main issue.

Smithers wrote:

2) The image thing at the bottom doesn't use CAPTCHA (from what I hear, CAPTCHA is not a PHP function/whatever)

I've looked over the sorce of the file, and it does seem to be a CAPTCHA, but one that doesn't rotate like many of the ones that we see today on registration forms.

Here is the link to the "CAPTCHA" image on the server.
http://forums.root32.org/img.php

When looking at the source, and the result of the page, I would still guess that it for some reason is being read as an image (possibly due to the code within img.php).

-Steve

Re: Firefox register.php with CAPTCHA issue

Content-Type: image/png
Still there wink

If you paste the register.php code in here I'm sure we could find the issue

Re: Firefox register.php with CAPTCHA issue

"The only odd markup is that stuff somebody has added in the announcement box and a totally pointless table. Unclosed tags and, I almost can't believe it, tags in uppercase. I guess there has been a time warp and we've gone back to 1998."

The only thing editted by myself is the _bottom_ of the reggy page, and recently (like, this morning) I modded the top nav thing to gen the "PM" link. The image/png header has been removed from the reg*.php so I dunno why you're still getting it. Possible cache issues, me senses.

The stuff in the announcement box .. I can't explain. I've not touched it (ask Jacob)

My HTML style is very old, yes (I left for better things 1.5 years ago) but it's worked for me so far. The tags are in upper case because they are 'supposed' to be. From what I can see, there're no unclosed tags around where I have editted the reg page, so that again is out of my hands. The tables are there to format the page. I couldn't use anything else because it formatted incorrectly. Using <div> tags caused them to line up next to each other. Same for breaklines. I threw some empty tables in because they're the only sure-fire way of knocking everything onto the next line. I personally hate any form of new, 'this is so great' HTML including div, etc. because they seem.. wank. That could be because I don't understand them.. and to be 100% honest, I don't want to big_smile Bigger things on my plate ATM.

The bot/script check was coded by myself. It's all standard stuff. The reg page calls for an image (img.php). The img.php page generates a random number, creates an image and writes the text to it. Obviously it uses sessions. The page itself is fine. Everything is there, in the right order, closed properly, and it works.

To say my PHP is the cause of the problem is a bit off the mark. We know the problem is browser-specific.. meaning it's a problem with what the browser is handling. The browser only handles 2 things. 1, headers. 2, HTML/JS. PHP is server-side, therefore.. it never makes contact with the browser. If there was an actual PHP error, the PHP parser would say so... but it's not. So, the problem has absolutely _nothing_ to do with my PHP. I can safely say that. I am guessing the problem is related to the way firefox/opera handles different bits of HTML/JS, or possible incorrect headers (could be the image/png thing.. but like I say, that's gone now so that bit is out of my hands)

Dom (admin at the site) did report that he was getting other errors in FireFox. Before we made any mods to it. That being, the nav bar at the top didn't change, whether he was logged in or not. It continued to display the register/login links.

Re: Firefox register.php with CAPTCHA issue

Paul wrote:

Strange people. All the markup is bog standard xhtml 1 Strict. No XML (in the purest sense) and no funny tags. The only odd markup is that stuff somebody has added in the announcement box and a totally pointless table. Unclosed tags and, I almost can't believe it, tags in uppercase. I guess there has been a time warp and we've gone back to 1998.

You obviously know plenty.. So that said.. You obviously are aware that capitals is what code should be done in..

14

Re: Firefox register.php with CAPTCHA issue

I'm not just being pedantic or flippant about the markup. PunBB is coded in XHTML 1.0 Strict. The existence of the strict doctype puts browser into standards compliance mode. That means any markup which is not xhtml strict could potentially cause problems.  In many cases it doesn't but if you use non valid markup it can make it much more difficult to track down whats causing errors.

XHTML, unlike HTML, is case sensitive. All tags and attributes must be in lowercase. It's not a question of coding style, its part of the specification. As for unclosed tags, the <img>, <br> and <input> tags are unclosed. They should be <img />, <br /> and <input />.

The usual cause of the login problem is cookies being disabled or blocked. Also see http://punbb.org/docs/faq.html#faq2_5.

Re: Firefox register.php with CAPTCHA issue

"(could be the image/png thing.. but like I say, that's gone now so that bit is out of my hands)"
No it isn't tongue
I still see it there, your server is still sending the header, whatever is sending the header is causing the issue: it's as simple as that