MyBB Community Forums

Full Version: Odd cookie issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've read several threads on this and I've tried everything I can think of to get the login working.

My website url: http://myserver
(this is a separate pc running a webserver in my apartment)

My Forum URL: http://myserver/forums

Going by what I've seen on the forums:
Cookie Domain: myserver
Cookie path: /forums/

I have this webserver set up so that I can do my testing here and then install it on my actual site once I get my theme, templates, mods how I want them. However, I cannot login at all. I get to the screen where it says I had a successful login and it will redirect me, but when I get back to the forum index, I am not logged in.

I've tried going with alternate cookie domains and if I leave it blank, it will let me login, but then I cannot logout at all. It says I logged out successfully, but I am still logged in when I return to the index. I would really love to be in the middle of the road here Smile.

At first I thought it might be due to the fact that I do not have a "traditional" url since it is a home based webserver, but I don't know enough about the inner workings of mybb to make that more than a guess.

I am running 1.2.1 on this test server... helping hand anyone?

- Blick

EDIT: Really quick update... I tried Crakter's plugin for autosetting the cookie info (activated it, turned it on in general options, deleted any cookie references for my webserver, reopened firefox), and the problem persists.
I tried that one before as well, but went ahead and tried it again... the only difference to what I had been using was adding the support for subdomains, and I still get the same results.

So far I believe I have tried every combination I can think of:

Cookie Domain:
blank
.
.myserver
myserver

Cookie path:
/
/forums/
/forums

I have used each Cookie Path with each Cookie Domain with triple checks to make sure that I cleaned out all cookies as well as restarted my browser. I have tried it from other pcs on my network (had never been to the site from them), and I get the same results.
Your cookie settings should be:

Cookie Domain: .myserver.com
Cookie path: /forums/

You need to clear your cookies before you try again.
I don't access my server with http://myserver.com since it is on my local network. I use http://myserver and always have. So that would make what I need to use .myserver and /forums/ correct? I double checked my settings, cleared all cookies, and restarted the browser completely, and I still get the same issue - it says I logged in, but never truly do. Is there an issue with running a web server on my local network? I am running WAMP (Windows, Apache, MySQL, PHP) and I used this same machine to test a previous version of mybb before going to a live site and everything worked flawlessly.

Just a thought that came from noticing that http://myserver.com comes out as a link while http://myserver does not. Perhaps a similar system is setting up the cookies and has trouble with my server not having a .com/.net/etc at the end?
I've wamp server too, and i have installed MyBB on it, and I can log in and out correctly.

this my cookie setting.
  • Cookie Domain = empty
  • Cookie Path = /

thats the correct setting for the localhost working good with me. I hope that help full
Note : almost of js didn't work ok on the localhost
OH. If your running on localhost then your cookie domain needs to be empty. The Cookie path should be what I said above though.


Everything should work fine (including JS)
I'm sorry for not clearly explaining my network properly. It is not on localhost, but just on my local network. I have a Windows Server 2003 PC, and it's pc name is myserver. When connecting to the web server from any machine on my local network, I use http://myserver. It is just like any other web server as far as my pc is concerned. I did this so that I could simulate as best as possible the conditions of a web site. I hope this clears that up. Mybb is nowhere on the pc that I am logging in from; it is installed on a separate web server that is on my network.
Have you tried the cookie settings that pepotiger posted? Cleared cache and cookies?
Yeah I have.. those settings are what I was talking about in my first post when I could log in, never log out. It would keep me logged in even though it would acknowledge a correct logout.
Pages: 1 2