Sudden Log in/out problems - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-08-2010, 01:34 PM   #1 (permalink)
Junior Member
 
Join Date: Dec 2009
Location: TN
Posts: 24
Default Sudden Log in/out problems

I'm not certain this problem is caused by the PHP code, however the site I am developing uses PHP to build dynamic pages where even the HTML is enclosed in PHP string variable(s). Server is Linux Fedora Core, and db is MySQL.

Everything seemed fine for quite a while. Actual site has been live for about 5 years. Revisions made in October to visual affects (images, some functional components, etc) about 3.5 months ago. No site revisions since.

However, less than a month ago (Dec-14 or so until now, Jan 8, 2010) we have had users complaining of being logged in or out at random. I'm not certain if the problem is related to cookies, or sessions, or something else. [I have posed the AOL proxy server concern and session issues separately on this forum when it was still unclear. I think I have taken measures to eliminate the AOL concern and have changed the caching issues that might have caused the someof the problems. Since my changed (with help from others in the development world), it is no longer randomly logging in and out. It is now very predictable when it will log users in and out of the system. Now, all browsers seem to treat the log in the same way, where before the login status behaved differently for IE, or Firefox, or AOL users.

Here is the problem: the user log in system was not changed in the last revision. We are pretty sure the problems started two months after the revision, not with the revision. So without having changed the PHP code the runs the log in status check in many months (if not 5 years), why did it suddenly start randomly logging users in and out, or now predictably log users in and out for certain URL's?

Does anyone know why PHP session/cookie login system would suddenly develop issues if the code has been unchanged for many years? The "help" I have gotten this from other sources has been in the "I don't know" or "use a different system" category, which does not answer why or what went wrong. Even if the current system being used is not the best, it was fine until Dec 14th, when it suddenly stopped. If it had not been working for 5 years, I would agree with them. To suddenly stop, means it used to work fine.

Please help!
  • The only things I can link to the start of this time frame, where the problems were all reported, are the following suspects (however, not likely):
  • We upgraded RAM from 1 Gig to 2 Gig because of server lag time, but host company told us this is not likely to cause those problems.
  • AOL and Firefox did receive updates very close to or on those dates. IE might have in a Windows Update. Has support for cookies and/or session handling (client-side) recently changes or been found buggy?
  • I changed the color and font of two classes in an external CSS stylesheet.
  • I changed header code after issue developed to prevent page caching...which seemed to have removed some security issues and make browsers behave the same instead of different/random affect.
  • I have changed our cookies back and forth, but changing value or date of cookie(s) still have no affect. This may not be the problem, but looked suspicious. Clearing cookies does reset users normally, until they log in and out the next time.

The other issues (that may be linked to the same underlying problem) are also posted on this forum:

Can any one help? Please keep in mind that the login processing code has not changed from 5 years of working correctly and during the reported problems...so it did work. The only changes I made were to test/combat the issues that developed. Please Help!!!
LordKosh is offline   Reply With Quote
Sponsored Links
Old 01-08-2010, 01:39 PM   #2 (permalink)
Junior Member
 
Join Date: Dec 2009
Location: TN
Posts: 24
Default Re: Sudden Log in/out problems

Sorry, one other thing. Last week (3 weeks in with the problem), server lag prompted me to get host to reboot server. In the process, they infomred me that they were having "switching" issues and that they were working on the problem. They say that this problem is resolved, but I can't help but wonder if it was/is part of the problem...and maybe it isn't fixed. I doubt it, but I would hate to leave a stone unturned...
LordKosh is offline   Reply With Quote
Old 01-13-2010, 05:06 PM   #3 (permalink)
Junior Member
 
Join Date: Dec 2009
Location: TN
Posts: 24
Default Re: Sudden Log in/out problems

I am still not sure what caused the problem, however it appears that adding some code has fixed the site. One of the main steps was to add:
header("Cache-Control: no-cache");

Perhaps all browsers, not just the AOL proxy servers, were cache the pages with login status on them. This could explain why users could see they are logged in sometimes and logged out others. The logged in pages were cached last when they were logged in. Those showing them logged out could have been older pages they viewed when logged out. (???) Not sure, but this is the best explanation for now. This change removed the randomness...all browsers suddenly showed the same login issues.

The other fix was to adjust the cookie. While "www.site.com" is supposed to be a valid for the cookie domain, the browsers still add a "." to the front making it ".www.site.com". My change was to make the the cookie domain ".site.com" which is also a valid form. This fixed most of the other issues.

My only problem now is that my forum keeps them logged in even if the rest of the site logs them out. But this is very predictable...happening only when users click the "Log Out" link. Most of our users never log out, so it is much more isolated...and not random.
LordKosh is offline   Reply With Quote
Old 02-22-2010, 11:17 PM   #4 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 6
Default Re: Sudden Log in/out problems

Just joined glad you sorted your problem I had no end when my hosting company upgraded to php5
shadiadiph is offline   Reply With Quote
Old 02-23-2010, 04:07 AM   #5 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 17
Default Re: Sudden Log in/out problems

Good info
Thanks
Charming is offline   Reply With Quote
Reply

Tags
issues , log in , not working , problems , suddenly stopped

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 12:06 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting