You were unable to login. Please check your cookie settings.

Started by Jack_40k, August 11, 2010, 09:15:24 AM

Previous topic - Next topic

Jack_40k

OK,

So I spend about a week trying to get the package manager to work and it finally does. I install a few mods.. 3 MODS! and then try to login and look what happens...

"You were unable to login. Please check your cookie settings."

I cannot login into my account / any account on the forum using Google Chrome / Internet Explorer. Works fine using Firefox but cannot use Chrome or IE.

This issue seemed to occur after installing the "Ad Management" mod. I have no idea what it altered but it did something which rendered the forum unusable.

Yes - I have read through the many posts before this which suggested a few fixes including: Clearing SMFs cache, clearing browser history/cache/cookies, fiddling with the cookie settings in SMF (under server settings). That's what I've tried so far and it has had NO effect.

I am running SMF 2.0 RC3. How should I go about fixing this latest blunder?

Thanks,

Jack.

CapadY

go to the dir packages/backup and restore the backup "Before installing Ad Management".
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Jack_40k

Well I'm running the forum out of a virtual machine on my computer so I can backup and change back to a fresh install state any time I like. I need the ad management program to run on the site though, this is an integral part of the forum. I just want to know why this issue occurs. Is there a reason why SMF should be compatible with Firefox but not Chrome or IE?

Does anyone have a real fix for this problem or is it completely unsolved/avoided until this point?

Jack_40k

Well I found that something strange was happening. Even when I use a fresh install of SMF on the server (all new files, everything straight out of the install  package) this error still occurs. Also, when I use the theme "Argentum" on my forum, the error occurs and when I use the SMF default theme, it doesn't occur! So it seems as if the error is related to the theme I'm using.

Does anyone have a suggestion for how I can go about fixing this? I really like that theme and want to use it..

EDIT: Ok, now I've found out that the only reason the default theme login is working is because it has the 'quick login' bit up the top (without going to the login page). When I use the quick login I don't get the cookie error at all ever. However, when I use the proper login page, I receive the error. Something wrong with the code of the login page?

xenovanis

There's nothing wrong with the login page. It works for the most of us  ;)

Can you post back the settings from Admin -> Configuration -> Server Settings -> Cookies and Sessions?
Also, can you post a link to your site?
"Insanity: doing the same thing over and over again and expecting different results."

Jack_40k

Cookie Name: SMFCookie252

Default login cookies length (in minutes): 60

Enable local storage of cookies
(SSI won't work well with this on.)    = ticked

Use subdomain independent cookies
(turn off local cookies first!)               = unticked

Use database driven sessions                      = ticked
Allow browsers to go back to cached pages = ticked

Seconds before an unused session timeout = 2880


Yeah I know it works for most people.. So why not me? What's so strange about my setup? I installed SMF, uploaded my database and installed some mods. Now I can't login and friggen use the forum.

I cannot provide a link to the site because I'm running SMF out of a virtual machine on my computer as stated above.

xenovanis

How's this virtual machine setup? It could as well be an issue in the sessionsettings in your phpconfiguration.

Could you try running repair_settings and see what's the recommended settings for your cookies?

What is repair_settings.php?
"Insanity: doing the same thing over and over again and expecting different results."

Jack_40k

Yeah I ran it and the only change I made was the name of the cookie from 'SMFCookie252' to 'SMFCookie11'. Obviously that didn't work..

I run the virtual machine out of my computer using virtualbox and have Fedora 7 installed.  I have FTP enabled and allow SMF access to it and I access it myself using an FTP client.

I have a friend who set this up for me, he knows all about the server settings and Fedora etc.. but he's not here at the moment. How can I access the sessionsettings?

If I gave you a copy of the phpinfo file would that help?

Also, I only have this setup enabled so that I don't need FTP enabled on my live (online) server. My idea is to make the modifications to the forums on the virtual server, where I can make plenty of mistakes without consequences, then upload a stable version to the live server. Is there a chance that when I upload SMF in this state (with this error) the error will not occur on the live server? I just find it really strange that the issue doesn't occur using Firefox but does using IE or Chrome..?

Thanks.

xenovanis

To be honest, I do know serverconfiguration can cause problems, however I can't tell you how and why, of how it's best to setup the configuration.

However, if it does work in some browsers it might be an idea to check the cookiesettings for your browsers.
"Insanity: doing the same thing over and over again and expecting different results."

Jack_40k

I use the default cookie settings for the browsers, so if those don't work then they won't work for the majority of users (so no point really).

Jack_40k

Yeah I'm basically waiting for somebody to help me.. this is a major problem for me and I know other SMF members are experiencing the same thing (as there are other unanswered threads relating to this issue).

I have had so much trouble with SMF, I've been trying to upgrade a forum for 2 weeks unsuccessfully. This is ridiculous and borderlines the label unusable.

xenovanis

Sorry, can't help you with the cookiesettings :( I only know that it works in probably most cases on a decent configured server. Heck, it even works flawlessly on my probably indecent configured local windows machine. Even, since it does work for the most of us it's bound to be something on your side. Which could be anything, from even an antivirus application to a firewall.

Have you even tried installing a forum on your live server to see if the problem persists?

What went wrong with the upgrade anyway?

"Insanity: doing the same thing over and over again and expecting different results."

Jack_40k

OK here's a quick update.

I wiped everything clean and started new. My old live forum was at version 1.1.8. So what I did was create a fresh install of 1.1.8 on my virtual server. No problems, installed correctly and I set all permissions and ownership to their correct values.

I then uploaded my old 1.1.8 database and everything was just as it was in the online version (except I was using a default theme and no mods). *IMPORTANT* Just to be sure I checked to see if I could login correctly in 1.1.8 using the default theme login screen. This worked.

I then uploaded the SMF 2.0RC3 upgrade package to the server and started the upgrade. It all went smoothly and without error (database plus forum files/folders all successfully upgraded).

I then went to login to the SMF 2.0 RC3 board and the login failed.

How can this be a problem with the server side? I have upgraded the forum flawlessly and STILL get this error. This most likely indicates that it's not a problem on my side? More like a problem with the database change from 1.1.8 to 2.0 RC3? Would certain tables inserted by mods make a difference? (i.e. shoutbox/smf ads tables in the database?).

Is it worth uploading the upgraded version just to be sure that it doesn't work? It's a lot of time and effort wasted if it doesn't work..

I'm just SO puzzled. How can it not work?! What can possibly change that could fiddle with cookie settings and make it impossible to login (but NOT from Firefox?!?!)???

rd

I don't see anything wrong with upgrading from 1.1.8, but you should maybe try.

Leave the database, get 1.1.11 large UPGRADE package and upload those files and folders to your root smf install dir. Then run, localhost or whatever your using /upgrade.php

Use that to upgrade the database to 1.1.11 then get the 2.0 RC3 large UPGRADE package and upload all files and folders (don't touch the database), then go to the domain/ip/localhost and run /upgrade.php, if you had a domain it would have been yourdomain.com/upgrade.php is smf is in public_html

Upgrade.php will upgrade the database to SMF 2.0 RC3 version. 

Jack_40k

OK so basically you're saying upgrade from 1.1.8 to 1.1.11, then from 1.1.11 to 2.0 RC3?

If so, I've already done that (did it in the first instance).. And in fact when I first did this I don't remember the error occuring (can't be sure). But yes I can try it again tonight.

Jack_40k

Update: Upgraded from 1.1.8 to 1.1.11 - nope still get the error.

In fact, the error really is this:
- On first login try I get "An Error Has Occurred! You were unable to login. Please check your cookie settings."
- On second login try I get "Password incorrect".
- On third login try, I can login.

This is on Google Chrome and IE - on Firefox no problems..

Kays

Hi, have you tried changing the cookie settings in the Admin CP to the following?

Enable local storage of cookies - unchecked
Use subdomain independent cookies - checked
Use database driven sessions - checked

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Jack_40k

Hi,

Yes I tried every combination of settings without success.

This might help diagnose the problem:
http://www.simplemachines.org/community/index.php?topic=173730.msg1192825#msg1192825
http://www.simplemachines.org/community/index.php?topic=353822.msg2408460#msg2408460
http://www.simplemachines.org/community/index.php?topic=325349.msg2167473#msg2167473

These seem to relate to the issue I'm having. In one of the threads they talk about the .HTACCESS file.. Not sure if that's of any relevance?

Also, does anyone know how I can save the phpinfo file? I know I have to upload it to my server where I can view it.. But apparently I can't just save it as a webpage and upload it (I tried before and someone said it wasn't in the correct format :/ ). Not sure if that will help either but just throwing suggestions out there at this point.

Kays

Yah, there's something funky going on if none of the settings combinations work. The thing is that it does work on your live site so it's more a local problem.

When you first set this site up from the database backup, did you run repair_settings.php?. If not do so.

Quote
These seem to relate to the issue I'm having. In one of the threads they talk about the .HTACCESS file.. Not sure if that's of any relevance?

Is there any thing pertaining to paths in the .htaccess file at the root of this site. If there is one, try removing it.

Quote
how I can save the phpinfo file

A good question. You might be able to highlight the whole page and save it as a .txt document. Or right click on the page, select "View Source", highlight all that, copy it and save as a .html page

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Tyrsson

During the time when you checked those settings combinations did you clear your browsing history and stored cookies as well (after each change)?? This is very very important as especially IE will cache all kinds of funky stuff and give all kinds of problems.

If iirc your servers php config is by far from default as I think you posted a phpinfo file in another thread *I think*..

Question:
In regards to this virtual machine you are running. Did you install the LAMP package from the Fedora repositories?? If not then why?? If so have you checked the known bugs list for anything to do with the distro's LAMP package having problems with sessions or cookies. The reason I ask is that at one time I know there was a bug in the Debian (I think) sessions management if memory serves.

My point is that this IS a local server issue and as such it really is beyond the scope of support that can be provided here. The reason is that there is so many variables that goes into setting up a server that many times it is just simply impossible to diagnose the issue without having access, which you plainly will not give to a teamie here. Which is ok, but you have to understand that limits us greatly and when it comes down to it, when you start setting up local servers it becomes your learning curve. We have all been there and its a headache I know, but trust me, its worth it.

PM at your own risk, some I answer, if they are interesting, some I ignore.

Tyrsson

Quote from: Jack_40k on August 18, 2010, 09:09:21 AM
Hi,

Yes I tried every combination of settings without success.

This might help diagnose the problem:
http://www.simplemachines.org/community/index.php?topic=173730.msg1192825#msg1192825
http://www.simplemachines.org/community/index.php?topic=353822.msg2408460#msg2408460
http://www.simplemachines.org/community/index.php?topic=325349.msg2167473#msg2167473

These seem to relate to the issue I'm having. In one of the threads they talk about the .HTACCESS file.. Not sure if that's of any relevance?

Also, does anyone know how I can save the phpinfo file? I know I have to upload it to my server where I can view it.. But apparently I can't just save it as a webpage and upload it (I tried before and someone said it wasn't in the correct format :/ ). Not sure if that will help either but just throwing suggestions out there at this point.

Just a note, you have already posted a phpinfo file once... Here is the thread its attached too.

Strange occurrence while using the package manager [Installation problem/issue]
PM at your own risk, some I answer, if they are interesting, some I ignore.

Jack_40k

Yeah but that file doesn't open properly does it?

Also, I'll have a fiddle with the server and upload the non-working SMF edition to the live server to test if it really is a server issue.
Also thinking about upgrading PHP etc.. to latest versions (although latest versions aren't compatible with Fedora 7? so have to upgrade that too..)

I did also notice that when I did the upgrade from 1.1.8 to 2.0 RC3, there were some issues with some files needing to be manually edited or something..? Didn't notice it until I did another test upgrade recently (will check that out and verify it doesn't effect error).

notes: - Yes I cleared my browsing history (using CCleaner) after each settings change.
- If by a LAMP package you mean MySql, PHP and Apache then of course I have these installed on the server.. It wouldn't work otherwise?

Jack_40k

When upgrading from 1.1.8 to 2.0 RC3, there is some issue with upgrading templates:

There have been numerous language and template changes since the previous version of SMF. On this step the upgrader can attempt to automatically make these changes in your templates to save you from doing so manually.
The following template files will be updated to ensure they are compatible with this version of SMF. Note that this can only fix a limited number of compatibility issues and in general you should seek out the latest version of these themes/language files.
Area   Changes Required
"English" Language Pack
(ModSettings)
1
"Default" Theme
(Modlog)
2


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

It doesn't specify what needs to be changed so.... :S ?

Similar threads: http://www.simplemachines.org/community/index.php?topic=394172.0
http://www.simplemachines.org/community/index.php?topic=243246.msg1570224#msg1570224

Jack_40k

Also, does the phpinfo file work for you from the other thread?

Tyrsson

Yes, the phpinfo file worked I suppose.

By LAMP I meant the prepackaged distro package that is installed from the distro's repos. It can not be taken for granted that you installed it this way. You could have installed each (Apache, Php and MySQL) as separate installs and config'ed them....
PM at your own risk, some I answer, if they are interesting, some I ignore.

Jack_40k

OK so what's the difference?

There is no other way to install Apache, MySql and PHP. My server complies with all of the minimum requirements set by the SMF website (although, what is the minimum version of Apache required?) relating to MySql and PHP. Please tell me WHY this is a server issue. There are various vague explanations pertaining to settings.. But shouldn't you know the settings required to run SMF? If I comply with minimum requirements, why doesn't it work?

Also - in reply to another user in the thread.. It's not that I don't WANT to give you access to my site - it is run on a virtual server. I cannot give you access unless I send you a file (the server) which is a couple of gigs large and you emulate it with VirtualBox, so please don't make it out that I'm not giving you access to information. I'm trying to be as transparent as I possibly can.

Tyrsson

Quote from: Jack_40k on August 24, 2010, 04:11:39 AM
OK so what's the difference?

There is no other way to install Apache, MySql and PHP. My server complies with all of the minimum requirements set by the SMF website (although, what is the minimum version of Apache required?) relating to MySql and PHP. Please tell me WHY this is a server issue. There are various vague explanations pertaining to settings.. But shouldn't you know the settings required to run SMF? If I comply with minimum requirements, why doesn't it work?

Also - in reply to another user in the thread.. It's not that I don't WANT to give you access to my site - it is run on a virtual server. I cannot give you access unless I send you a file (the server) which is a couple of gigs large and you emulate it with VirtualBox, so please don't make it out that I'm not giving you access to information. I'm trying to be as transparent as I possibly can.
This post shows the problems you are having. So let me list them.

1.) Yes there is another way to install those. You download the INDIVIDUAL install packages for each and install them, then configure them. Which, sometimes, makes a huge difference to what actual *default* configuration you end up with just after install. Please, read up on the subject it would help.

2.) Yes, you can give access to a Virtual server, companies do it all the time. As a matter of fact you public hosting could be running on a "Virtual Server" and you never know it. The Virtual machine can have a network connection just as a physical machines does, and yes I know this due to me having two different Virtual machines running on the system I am typing this on at the moment. You simply have to network them, open ports, forward ports etc blah blah.

3.) Its not simply a matter of "meeting" the minimum requirements. When you configure your own server, the servers configuration and how that effects how the server and its modules process information, in what order it processes that information, whether it does not process it, whether it logs that, whether it issues a warning, what level warning, and how all those variables ALLOW the script engine to process the smf code, such as how it handles session data and cookies. As an example, what is the php configuration value for the sessions directives? Here is a list of most if not all of them, however, please keep in mind this is for Php version 5.2.13 running as CGI/FastCGI.




session.auto_start -  Off
session.bug_compat_42 - Initializating of session variable in the global scope - Off
session.bug_compat_warn - Initializating a session variable in the global scope - On
session.cache_expire - Time-to-live for cached session pages in minutes - 180 minutes
session.cache_limiter - Cache control method to use for session pages - nocache
session.cookie_domain - Domain to set in session_cookie - no value
session.cookie_httponly - Access the cookie only through the HTTP protocol - Off
session.cookie_lifetime - Cookie lifetime seconds - 0
session.cookie_path - Path to set in session_cookie - /
session.cookie_secure - Whether cookies should only be sent over secure connections - Off
session.entropy_file - Path to an external resource using as an additional entropy source - no value
session.entropy_length - Number of bytes which will be read from the file specified above  0 Bytes


This is not all of them but if you look at the ini file that is loaded it will list them for ya.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Pillas

Did someone ever solved this? Since i am starting to have the same problem with my forum, and atleast it's not the clientside, since every user has different settings. I also got all the same settings in my php.ini as above, and i see alot of other people having the same problem.

It might not be SMF in general, but someone should atleast find out what's not working with what, since it has to be some kind of trigger. This cookie problem is just random, and you can clear your cookie cache and still get the error message..

xenovanis

Unfortunately, as it seems, there are no ideas about this. In all honestly, I have owned forums on different hosts and never had this problem even using integrations with other software.

Sorry I couldn't be of more help :(
"Insanity: doing the same thing over and over again and expecting different results."

Jack_40k

Fantastic news everyone! I have found the EXACT issue and hopefully now we can begin to fix it.

The problem is this: When I log in with a 'Minutes to stay logged in" option enabled, I get the cookies error. When I click the "Always stay logged in" button, there is no error!!!

That explains why I was able to log in using the 'quick login' bars - because the default setting next to the bar is to be logged in forever. On the actual login page, the default is to stay logged in for 60 minutes!

What I need somebody to do is to tell me how to GET RID OF the "Minutes to stay logged in" option and default all options to stay logged in forever. Then I can get my forum up and running again (YAYYYYY!!!!).

Now you support guys have something to work with: remembering that this issue does not occur with Firefox but does with just about every other browser (javascript problem?)

Thanks,

Jack.

Tyrsson

I will try to find sometime this evening to look into this further.
PM at your own risk, some I answer, if they are interesting, some I ignore.

Jack_40k

Hey, so can someone help me out with the problem of removing the "Minutes to stay logged in" option and tell me how to enable "Always stay logged in" as the default option??

Alex' Manson

Quote from: Jack_40k on September 08, 2010, 06:43:02 AM
Hey, so can someone help me out with the problem of removing the "Minutes to stay logged in" option and tell me how to enable "Always stay logged in" as the default option??
i personally like that option it's kindof security in public pc's friend pc's so if you forgot to logout it logs you out automatically so the other guy there doesn't open you'r admin / mod account and start doing things..

Jack_40k

Oh ok. So what you're saying is, it's better not to log in at all that to be able to log in. Correct?

Or can you actually contribute to solving the problem at hand?

adel314

If you are having this problem on IIS machines then you might want to check your cookies settings (I had this problem for some time until I reset the cookies to the settings below)

Admin->Server Settings->Cookies and Sessions

Cookie Name = MECookie101
Default login cookies length (in minutes)  = 5600
Enable local storage of cookies = checked
Use subdomain independent cookies = unchecked
Use database driven sessions = checked
Allow browsers to go back to cached pages Seconds before an unused session timeout = checked

Aleksi "Lex" Kilpinen

Any updates on this? Surprisingly I've had some similar troubles lately - on several SMF installs, where I know nothing on the server side has changed. But it really seems to come and go, sometimes I have no problems logging in, when at times I have to try 10 times.
I have had the luck of noticing that this mostly happens to me on IE8, so I'm beginning to think it might be a browser issue in my case.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

adel314

I spent a few weeks on this and was able to work around the problem by clearing the browser cookies each time.  I found if the browser remained loaded, you could log off and on as many times as you wished, even logging in from new tabs, i.e. the forum worked as designed, however the instance you closed the browser you would receive  the "Unable to login error again"  I believe it is something to do with not being able to create a session - I found at one stage the way to get the login to work was to put in the wrong password, this has the effect of clearing all the session cookies.

My initial installation worked for a long while, until I had to change the domain name, that is when my problems began - so my feeling is that it is a server side problem.  Anyway, my view is that ultimately the server must manage the inconsistencies that exist between browsers. 

Aleksi "Lex" Kilpinen

Ok, thanks for the insights adel314 :)
Jack_40k, have you had any luck with this?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: