One of my sites keeps logging me out

Curt Guldenschuh Posted in Technical Support 9 years ago

One of my sites had developed a bad habit. Once logged in every time I click on anything it logs me out and takes me to the login page.

Replies
German Michael Zülsdorff Replied 9 years ago

Thanks for reporting, Curt.

It's always good to know when a problem can be marked as being solved in the end.
(Actually, we were already thinking of adding a "solved" icon to threads like that in the near future.)

us Curt Guldenschuh Replied 9 years ago

I have edited the start.php files to identify each separate site by naming the session name the same as the site name...single word. This seems to have taken care of the problem I was having. Thanks for the pointer.

us Curt Guldenschuh Replied 9 years ago

Yes! Thank you! That's what I was looking for. I did not realize the session identifier was a static name. I would have thought that it would be generated as a unique identifier hashed from some code...perhaps from the directory the installation resides in or the initial date/time of installation, etc. I looked at the link and this should take care of my situation in short notice. I plan to change that to match the site name and all will be fine. Thank you again.

Oh...and I have 4 sites running OSSN at the moment. Maybe I should set one up as a main index/traffic director to the other sites. LOL. Hey...I love this program!

Indonesian Arsalan Shah Replied 9 years ago

> You have two sites on the same domain. (say, a blog and a forum)
>
> If they ran on the same session and used the same variables in, they would conflict
>
> session_name lets you give each application a different session.

Ref: http://stackoverflow.com/questions/7551404/php-what-is-the-purpose-of-session-name

If you wanted to run multiple Ossn website on same doman (not on subdomains) you can try to replace your system/start.php file with following file:

https://gist.github.com/lianglee/4aaef29752111e17ed2c

Make sure you change 'WebsiteN' , with each website number. forexample

start.php on website 1
Website1

start.php on website 2
Website2

start.php on website 3
Website3

us Curt Guldenschuh Replied 9 years ago

Please delete this thread. I cannot find a way to do so.

us Curt Guldenschuh Replied 9 years ago

My apologies...I hit the search box at the bottom of the page but it did not pull up anything for "cookies". I did not realize there was already a thread on this matter. Please delete this thread.

German Michael Zülsdorff Replied 9 years ago
  1. If already running, stop your browser
  2. (Re-) start your browser
  3. Log in to that very site (front end)
  4. Tell us exactly what you're clicking next and the url you're being redirected to

Repeat 1-4, this time log in to the administrator's backend

Next: Please, keep support cases as short as possible. If Arsalan asks you to provide your error_log, simply do so. Instead of starting an additional cookie discussion.

us Curt Guldenschuh Replied 9 years ago

Seems I had read someplace in here that OSSN does not use cookies?

us Curt Guldenschuh Replied 9 years ago

Oh...ok. That makes sense. Can we change the cookies so they identify for each different site? I plan on adding another site sometime today and will probably add a couple more in the next week or so. Where are the cookies generated?

us Curt Guldenschuh Replied 9 years ago

I have 3 OSSN sites on one domain...each in it's own subdirectory. How would that affect my ability to remain logged in?