Previous Thread
Next Thread
Print Thread
Rate Thread
#219402 06/19/2002 1:26 PM
Joined: Jun 2002
Posts: 5
Lurker
Lurker
Offline
Joined: Jun 2002
Posts: 5
I just upgraded from 5.4.3 to 6.0.1. Things worked fine for a while, however, now everyone is experiencing the same problem identifying new posts and complaining about it.

- The number of new threads and posts no long shows on the list of board and the list of posts. However, the lightbulb does light up when new posts come in.

- Now when new posts are added the book icon stays orange even after reading the entire thread. It won't turn back to yellow.

- Some people are having problems logging in and/or staying logged in. They login and then it tells them it's an invalid user. Sometimes they eventually get it to work, or by trying a different machine.

Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I believe part of your problem will be fixed with this thread.

I've received a few reports of individual users not being able to stay logged in, and it's proven to be a frustrating one to track down. I've tried every browser I can think of, a wide variety of threads sites and haven't been able to duplicate this yet.


UBB.threads Developer
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Just a thought on the cookie problem. A site that I'm hosting is having severe problems with PHP losing track of cookies/sessions, they just randomly die. The cookie is fine in the browser and the data on the server side looks perfectly OK, but for some reason it just doesn't work. Believing this was some bug in php 4.1.1 I did an upgrade yesterday but it didn't get better, so he has now posted a bug report to the PHP team about this. His site doesn't use threads, but maybe there could be some relation?

Joined: Jun 2002
Posts: 5
Lurker
Lurker
Offline
Joined: Jun 2002
Posts: 5
I believe the persistent login problem has to do with domain.com versus www.domain.com. I wrote a game that required user authentication. I was getting the same problem because I sort of learned how to do it by examining your code. It had to do with how you set the cookie.

The code I ended up using that worked without a hitch was the following:

code:

// after successfull login username/password match
function set_cookies($name,$pass)
{
global $myname,$mypass;

$Password_e = crypt_password($pass);
setcookie("myname","$name",time()+31536000,"/",".mydomain.com");
setcookie("mypass","$pass",time()+31536000,"/",".mydomain.com");
}

// logout code
function clear_cookies()
{
global $myname,$mypass;

setcookie("myname","",time()-3600,"/",".mydomain.com");
setcookie("mypass","",time()-3600,"/",".mydomain.com");
}



Now when you set cookies you don't specify the domain name. So it gets confused if people switch between www.domain.com and just domain.com. For example, your code:

code:

setcookie("w3t_myid","$Uid",time()+$config'cookieexp'],"{$config['cookiepath']}");



A lot of people describe this same problem:

-They login.
-It looks like they logged in successfully
-When they click on the index it tells them they haven't actually logged in properly. Invalid username/password.

When people described the problem along those lines I would tell them to do the following which seemed to fix it:

- Go to http://www.domain.com/board/logout.php
- Try logging in again.

Then they would tell me that it worked.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Here's another thread on this issue. The approach there is to do a redirect, but I think forcing a consistent cookie domain, as you suggested, is a better solution.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I've had experience with this as well. I learned to be consistant in links to my site...always using the www.

I moved my site to another server once... and used the .NET version of my domain on my new server so I could get setup, test and people could get access while my domain transfered...

It was a cookie nightmare using the 2 domains. I finally made my .NET address re-direct to .com.


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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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 20240506)