UltraBB Forums Home 
Home Search search Menu menu Not logged in - Login | Register
UltraBB Forums > UltraBB > Troubleshooting > New member link problem

 Moderated by: martin_wynne
New Topic Reply Printer Friendly
New member link problem  Rate Topic 
AuthorPost
 Posted: Fri Feb 3rd, 2012 07:33 am
  PM Quote Reply
1st Post
Robert
Member


Joined: Fri Jul 18th, 2008
Location: Benidorm, Spain
Posts: 1359
Status: 
Offline
Mana: 
User Gallery
A new member joining the forum in the usual way had this error when clicking on the link provided in the e-mail all registering member s receive :

Invalid SQL query: UPDATE wowbb_users SET user_activation_key='', user_group_id=2 WHERE user_id=701 AND user_activation_key=3306e695-Illegal double '3306e695' value found during parsing

The link they click on is this :

http://yourmodelrailway.net/login.php?user_id=701&key=3306e695&activate=1

Back To Top PM Quote Reply  

 Posted: Fri Feb 3rd, 2012 07:37 am
  PM Quote Reply
2nd Post
tanygaer
TOIDI


Joined: Mon Jun 16th, 2008
Location: Rhosgadfan, North Wales, United Kingdom
Posts: 2967
Status: 
Offline
Mana: 
User Gallery
Martin has a fix for this but for the life of me I cannot remeber it.

Back To Top PM Quote Reply

 Posted: Fri Feb 3rd, 2012 07:37 am
  PM Quote Reply
3rd Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 2013
Status: 
Offline
Mana: 
User Gallery
Hi Bob,

That's a known problem. Just move him to Full Member.

I will fix the problem later.

regards,

Martin.

Back To Top PM Quote Reply  

 Posted: Fri Feb 3rd, 2012 08:05 am
  PM Quote Reply
4th Post
Robert
Member


Joined: Fri Jul 18th, 2008
Location: Benidorm, Spain
Posts: 1359
Status: 
Offline
Mana: 
User Gallery
Hello Martin,

will do.

Bob

Back To Top PM Quote Reply

 Posted: Fri Feb 3rd, 2012 09:21 am
  PM Quote Reply
5th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 2013
Status: 
Offline
Mana: 
User Gallery
tanygaer wrote: Martin has a fix for this but for the life of me I cannot remember it.
It's a flaw in the PHP language, not a bug in Ultra.

PHP is an untyped language, which is intended to make it easier for beginners. But for someone used to a strongly-typed language (Pascal) I find it actually more confusing and error-prone.

Being untyped means the PHP interpreter must examine the contents of all variables to decide whether to treat them as strings, integers, or floats.

In this case the activation key is intended to be treated as a string. But in the event that it contains only numbers it is treated by the PHP interpreter as an integer. If it contains only numbers and one letter E (as in this case) it is treated as a float in scientific format.

You would think the case of an activation key containing only numbers and one letter E would be so rare as to be disregarded, which was probably Aycan's thinking. In practice it turns up surprisingly often.

The problem with this one is that the exponent part (the number after the E) exceeds the capacity of a 64-bit double-precision float. The numeric conversion therefore throws an exception, with the result seen.

The solution is to make sure all activation keys are invalid as numbers. The easiest way to do that is to prefix them with a letter which is invalid in any number format -- i.e. any letter above F in the alphabet. The usual solution for Ultra is to prefix the activation key with a letter U.

I believe Jim made that fix in 1.17 but Robert is still on 1.15

I will fix it shortly Bob, but in any event the likelihood of the problem happening again is extremely small.

edit: previous discussion about this is here: http://ultrabb.net/forum/view_topic.php?id=2064&forum_id=3

regards,

Martin.

Last edited on Fri Feb 3rd, 2012 11:22 am by martin_wynne

Back To Top PM Quote Reply  

 Posted: Fri Feb 3rd, 2012 12:51 pm
  PM Quote Reply
6th Post
Marty
Helpy Helper


Joined: Mon May 7th, 2007
Location: Chicago, Illinois USA
Posts: 1070
Status: 
Offline
Mana: 
User Gallery
Martin,

How did you figure that out? That is amazing.

Back To Top PM Quote Reply

 Posted: Fri Feb 3rd, 2012 07:04 pm
  PM Quote Reply
7th Post
Robert
Member


Joined: Fri Jul 18th, 2008
Location: Benidorm, Spain
Posts: 1359
Status: 
Offline
Mana: 
User Gallery
He amazes me all the time Marty as I call on him most days to fix something I have done wrong or answer technical queries from my members. Got the patience of Job that man has. Of course, as in his above post, I don't know what he is talking about most of the time. I just do what he says.

Last edited on Fri Feb 3rd, 2012 07:05 pm by Robert

Back To Top PM Quote Reply  

Current time is 10:18 am  
UltraBB Forums > UltraBB > Troubleshooting > New member link problem Top



Hosting

UltraBB 1.17 Copyright © 2007-2011 Data 1 Systems, INC.
Page processed in 0.2684 seconds (10% database + 90% PHP). 25 queries executed.