xoops forums

mondarse

Just popping in
Posted on: 2015/2/16 11:59
mondarse
mondarse (Show more)
Just popping in
Posts: 95
Since: 2003/2/3 1
#1

Session automatically closed after successuflly login

One of my sites has an strange behaviour that makes impossible to login if you don't delete cookies before, or if wait for a long long time (may be 1 day, not sure).

My site is configured like this:
- URL is a subfolder of main domain: https://www.????mydomain.com/courses/
https://www.????mydomain.com
 
is a different site with different filesdatabasecookie and session namesetc.)

- PHP Version 5.2.17
- Xoops: 2.5.6.
- Protocol: https
- Name for user cookies: x??????_user
- Use custom session: yes
- Session name: x?????_session
- Session expiration: 60

This error happens in this way:

- Fist login try of the day: everything goes ok, I can use the site normally.
- After use, I don't close session manually, simply leave the site loaded in the browser.
- After 1 hour or more, if I try to navigate again through the site I get the usual permissions error (needed to be logged to use the site).
- I try to log and the site shows that I have logged correctly with the redirect page (It doesn't use jGrowl redirect)
- After been redirected the main page is shown, but always logging block is displayed as sessions is actually closed.
- If I directly load site home page, It shows the login block.

If I delete cookies (only the ones of my site) I can log again without troubles.

Please help.

zyspec

Module Developer
Posted on: 2015/2/16 19:25
zyspec
zyspec (Show more)
Module Developer
Posts: 1077
Since: 2004/9/21
#2

Re: Session automatically closed after successuflly login

Don't have any specifics to help other than XOOPS 2.5.6 says it requires:

Quote:

PHP:
Any PHP version >= 5.3.7 (PHP 5.4+ is strongly recommended)

mondarse

Just popping in
Posted on: 2015/2/17 6:42
mondarse
mondarse (Show more)
Just popping in
Posts: 95
Since: 2003/2/3 1
#3

Re: Session automatically closed after successuflly login

This site is running with no update from 3-4 years ago.
My hoster says that no php upgrade/change has been done in this time.

The problem used to happen from time to time previously, but now it happens every time.

Mamba

Moderator
Posted on: 2015/2/17 19:50
Mamba
Mamba (Show more)
Moderator
Posts: 10992
Since: 2004/4/23
#4

Re: Session automatically closed after successuflly login

Quote:
This site is running with no update from 3-4 years ago.

It can't, as XOOPS 2.5.6 was released in April 2013

As Zyspec said earlier, you should upgrade to PHP 5.3.7+, with PHP 5.4 recommended! Most good hosts offer just to change one setting in the config, and you're running the upgraded PHP in 3 minutes!

Please read:

5 Reasons to Consider Upgrading Your PHP Platform

The author, Lorna Mitchell, offers her list of five things, each with a bit of summary and a few links to more information on the topics:

- Improved Performance
- Security and Support
- New Syntax
- Traits
- Built In Webserver

Also, XOOPS won't act strange "out of the blue" - there had to be a change to cause it. Check the logs fort the host changes, and go back and see if you have changed something but forgot about it ...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

dbman

Friend of XOOPS
Posted on: 2015/2/18 23:50
dbman
dbman (Show more)
Friend of XOOPS
Posts: 172
Since: 2005/4/28
#5

Re: Session automatically closed after successuflly login

Turn off custom session, you may need to do this via the config table in the database if you cant login. If your host implemented something like mod_security this may be the issue.