Previous Thread
Next Thread
Print Thread
Hop To
#21850 12/19/2000 2:31 AM
Anonymous
Unregistered
Anonymous
Unregistered
I just re-downloaded the latest 5.1.4. When I try to register a new user, the user is registered but I get the follwoing error and it does not register the password.. it sends it via email:
<font color=red>Warning: mt_rand(): Invalid range: 0..0 in /usr/local/etc/httpd/htdocs/healers/wwwthreads/adduser.php on line 201
Warning: mt_rand(): Invalid range: 0..0 in /usr/local/etc/httpd/htdocs/healers/wwwthreads/adduser.php on line 202</font color=red>
I am attaching my adduser file just in case.
Thanks,

Tommy

<P ID="edit"><FONT><EM>Edited by tgardner on 12/18/00 06:37 PM.</EM></FONT>

#21851 12/19/2000 2:56 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
What version of PHP are you using? I'm using the standard mt_rand function. Or maybe it is something else? Are you allowing the user to specify a password at signup? If so maybe I have a problem in that area.

-------------------

Scream

WWWThreads Developer

#21852 12/19/2000 3:03 AM
Anonymous
Unregistered
Anonymous
Unregistered
Scream,
I am allowing users to specify their password on signup... using Version 4.0 Php. I had no problems on the 5.1.2b
I am also getting the following the following error when I try to access a board:
Seeya! Unknown column 'B_UStatus' in 'field list': 1054

Warning: Supplied argument is not a valid MySQL result resource in /usr/local/etc/httpd/htdocs/healers/wwwthreads/mysql.inc.php on line 88
Maybe I will just start over tomorrow. *sigh*
Thanks,

Tommy
<P ID="edit"><FONT><EM>Edited by tgardner on 12/18/00 07:06 PM.</EM></FONT>

#21853 12/19/2000 3:06 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, let's take the easy one first. The unknown column sounds like you are running off of a pre 5.1.2 database. Are you pointing this at your PERL database? If so, then you need to grab the latest PERL version and run the altertable script to update the database to the proper format.
As for the adduser problem, I'll get that one figured out here shortly.

-------------------

Scream

WWWThreads Developer

#21854 12/19/2000 3:09 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, the fix for the adduser problem. In adduser.php about line 288 you will see the following lines:
$passset = array('a','b','c','d','e','f','g','h','i','j','k','m','n','o','

p','q','r','s','t','u','v','x','y','z','A','B','C','D','E','F','G','H','I','J','

K','M','N','P','Q','R','S','T','U','V','W','X','Y','Z','2','3','4','5','6','7','

8','9');

$chars = sizeof($passset);
What you need to do is move these 2 lines up about 4 lines or so, right before the if(!$pass) { line.
This should fix this problem. Let me know if it does so I can make the fix in the standard release.

-------------------

Scream

WWWThreads Developer

#21855 12/19/2000 3:20 AM
Anonymous
Unregistered
Anonymous
Unregistered
Yea Scream!
This fix works great.
Thanks a lot.
Tommy

#21856 12/19/2000 3:25 AM
Anonymous
Unregistered
Anonymous
Unregistered
Scream,
I created a new database.... think that I will create another one. It is definitely a 5.1.4 database - php.
I am attaching my dump file.
Thanks,

Tommy

#21857 12/19/2000 3:32 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Yeah, it looks like you got a buggy createtable. I fixed this awhile back. You can see in your w3t_Posts table that one of the fields is named B_UStats, when it should be B_UStatus.

-------------------

Scream

WWWThreads Developer

#21858 12/19/2000 3:36 AM
Anonymous
Unregistered
Anonymous
Unregistered
Used the new createtable and it works great. This is really a neat product.
Thanks for always being there Scream!
I really appreciate your help.

Tommy


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Having issues going from 7.5.5. to 8X
by Mors - 10/22/2026 5:32 PM
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 8:34 PM
Selling a Forum?
by ECNet - 10/10/2026 2:54 PM
Who's Online Now
1 members (1 invisible), 870 guests, and 118 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261016)