When Login in One site in Localhost Automatically Logged Out from Other!

Hi There,
i have installed Two elgg 1.8.3 installed on localhost

When i login in first elgg 1.8.3 i automatically logged out from second elgg 1.8.3

When Login in One site in Localhost Automatically Logged Out from Other!

  • How are you running elgg on your computer? I have several elgg installs running at the same time without that problem. Are you using xampp?

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • I actually have the same problem. I run WAMP, each installation has it's own data folder. I am assuming there is problem with a cookie.

  • I heard from the core team it was something related to cookies around a two years ago. It seems like the bug is still there, but it looks like it randomly appears?

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • @rjc: it is not a 'bug'; cookies - yes; those cwunchie thwangs belong to domain 'localhost' and so only ==1 logins are @same 'domain'. thence so kick-out ! unless... u wanna install, configure own dns serving @ localhost; play arnd w/ etc hosts; vhosts configs ;-) after that = no problems ;-oO;;P e.g. http://www.dhrup.com = exists only on my xampp ;-P and there yew go..!

  • Seconded - not a bug, a fact of life.  Use a different browser if working on simultaneous installations.

  • I believe the issue is because the session cookie has the name 'Elgg'. If the session cookie was based on the name of the site, this would probably work.

  • true re: the cookies (tied to the domain name as @above) - and because xamp/wampp/mampp treats all those 'domains' as @domain 'localhost'... -- and so one cannot win -- unless change the xampp apache configs for etc & virtual hosts --- recognize your 'local domain' as a legitimate one and not just always every localhost target as == localhost.

    e.g. dhrup.com is not a real domain out there in the real world, just playing here on my pc ;-o
    my xampp play dummy logs; the first is test for blocking access; second is unblocked

    [Thu Jan 26 16:18:42 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: C:/xampp/htdocs/dhrupcom/

    127.0.0.1 - - [26/Jan/2012:16:20:13 -0500] "GET / HTTP/1.1" 200 18 "-" "Mozilla/5.0 (Windows NT 6.0; WOW64; rv:9.0.1) Gecko/20111221 Firefox/9.0.1 SeaMonkey/2.6.1"

    so - could have domain holacostello.com on cash's pc and do the apache stuff correctly and.. yess.. his xampp is gonna go to C:/xampp/htdocs/holacostello/ ;-P

    @Matt: - yep different browser will do the trick if wanna test an elgg site @ localhost - that also works on live sites too ! if wanna login with same userid ;-) -- saves having to logoff/login for some type of testing areas.

     

  • oye - i just noticed that trac ticket ! in my opinion -- because of browsers, cookies and such cirsumstances - it is not really worth doing trac tickets for such a situation - because the behaviour will only affect certain types of development & testing situation and needs - but not any realistic nor substantial elgg/ web apps aspects and real-life usage. the rest of the world's cms`s & platforms largely do the same handling; and the code effort vs bang-4-my-buck ?? is that much  effort really worth the end result ? changing that amount code will not change the world very much..