Previous Thread
Next Thread
Print Thread
Rate Thread
#207022 12/18/2000 7:31 PM
Joined: Oct 1999
Posts: 44
Journeyman
Journeyman
Offline
Joined: Oct 1999
Posts: 44
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:

[: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

I am attaching my adduser file just in case.

Thanks,
Tommy






Edited by tgardner on 12/18/00 06:37 PM.

Attachments
22-27164-adduser.txt (0 Bytes, 22 downloads)

Sponsored Links
red_xiii #207023 12/18/2000 7:56 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
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


UBB.threads Developer
Sally #207024 12/18/2000 8:03 PM
Joined: Oct 1999
Posts: 44
Journeyman
Journeyman
Offline
Joined: Oct 1999
Posts: 44
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

Edited by tgardner on 12/18/00 07:06 PM.


red_xiii #207025 12/18/2000 8:06 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
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


UBB.threads Developer
red_xiii #207026 12/18/2000 8:09 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
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


UBB.threads Developer
Sponsored Links
Sally #207027 12/18/2000 8:20 PM
Joined: Oct 1999
Posts: 44
Journeyman
Journeyman
Offline
Joined: Oct 1999
Posts: 44
Yea Scream!

This fix works great.

Thanks a lot.

Tommy


Sally #207028 12/18/2000 8:25 PM
Joined: Oct 1999
Posts: 44
Journeyman
Journeyman
Offline
Joined: Oct 1999
Posts: 44
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

Attachments
27173-healer2.txt (0 Bytes, 18 downloads)

red_xiii #207029 12/18/2000 8:32 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
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


UBB.threads Developer
Sally #207030 12/18/2000 8:36 PM
Joined: Oct 1999
Posts: 44
Journeyman
Journeyman
Offline
Joined: Oct 1999
Posts: 44
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
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)