BFD Calendar

Session expires

Recommended Posts

BFD Calendar    35

The $config->sessionExpireSeconds in config.php is set to 86400 but still I have to log in as admin after about 10 minutes of inactivity. Any other hidden corners where I should look to set this right?

$config->sessionChallenge is set to true.

$config->sessionFingerprint is set to false.

Share this post


Link to post
Share on other sites
sforsman    269

I'm pretty sure your problem is in PHP's session.cookie_lifetime setting. You can check the value with

echo ini_get('session.cookie_lifetime');

There are many ways to change it - for an example you can just put this in your config.php

ini_set('session.cookie_lifetime', 86400);
  • Like 3

Share this post


Link to post
Share on other sites
BFD Calendar    35

sforsman, thanks but that didn't solve the problem. Tried with different browsers from different locations on different computers... I have other sites with same provider and same config.php setup and no problem there. It remains a mystery to me.

echo ini_get('session.cookie_lifetime'); says 86400

Share this post


Link to post
Share on other sites
Slav    2

@BFD Calendar Have you tried to set the $config->sessionExpireSeconds to something small like 30 sec or smthn to test if that line works or is considered at all... because I have a similar problem. I want to do some tests with session expiration, but when I change $config->sessionExpireSeconds to something small like 30 sec... it doesnt work in my case... I dont even know how long the session time is in my case... tried to wait like an hour without any activity and was still logged in... So yeah would appreciate if someone shares some knowledge on this issue...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Martin Muzatko
      Hello there!
      I want to create a user front-end (user can register/login/logout via templates)
      I'm working based on the intermediate site profile. So _init.php is loaded first, then the template file and then _main.php.
      I integrated the custom login as described here, and changed it to my needs. ( I don't want to redirect the user, if the form is filled in successfully)
      The problem I face, is that $user->isLoggedin() lags behind $session->login().
      Which means that whenever I do a login, I DO get the information that the login was successful ($session->login(...) instanceof User). I COULD use that information on _main.php to show a profile in the upper right corner.
      However I don't want to set a variable in the template and ask for it in _main.php. Are there any alternatives? Is a redirect really required to complete the session handling? Why? I have the same problem for the logout. The user is still displayed as logged in, when he opens the logout page.
      Thanks in advance.
      Best,
      Martin
    • By Mirza
      How to track user active time based on session login and logout.
      Basically, I want to get the report that each user login time and logout time/session inactivity time.
      Is there any module available or we can use any hooks to simulate the above.
      Thanks in advance for your support.
    • By suntrop
      Hi all. Perhaps this is just my fault, but I can't get behind it :-(
      When I store an array in a $session and want to read its contents – after a $session->redirect() – it is NULL by var_dump()
      If I use the exact same code and just store a string or a Page ID the output is correct.
      // file-1, product page $last_add_to_cart['product'] = $selected_product; $last_add_to_cart['quantity'] = $selected_product_quantity; $session->last_add_to_cart = $last_add_to_cart; $session->redirect('/warenkorb/'); // file-2, cart var_dump($session->last_add_to_cart); // is NULL Strangely this works 
      // file-1, product page $last_add_to_cart['product'] = $selected_product->id; #$last_add_to_cart['quantity'] = $selected_product_quantity; $session->last_add_to_cart = $last_add_to_cart; $session->redirect('/warenkorb/'); // file-2, cart var_dump($session->last_add_to_cart); // is 1234 EDIT: When I var_dump the $session before the redirect everything is ok
    • By dweeda
      At the top of each of my main pages, I want to redirect to my login page if the session is timed out.  How can I use the PW API to test for this?
      $user->isLoggedin() doesn't seem to do it, like I expected.
      THX
    • By gebeer
      Hello,
      I have a situation were a user cannot logon to several different PW installs fromdifferent machines on his workplace network.
      Sometimes the initial logon is working but when navigating the PW backend he gets thrown out. Sometimes even the initial logon is not working and he is redirected too many times and the browser throws a redirection error.
      This points to PW loosing it's session. But the same sites are working fine when accessed from within other network environments.
      The user's workplace network has some pretty tight security (firewall) restrictions in place that prevent PW keeping it's session.
      I don't know enough about network security so I can't tell what exactly could cause that problem. I checked in the browser settings to make sure session cookies are allowed and there.
      Has anyone ever experienced issues like that and would there be a way to make PW keep it's session under these circumstances?