Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session expires in 30 mins independent from config settings. #178

Closed
heavydetail opened this issue Sep 4, 2018 · 9 comments
Closed

Session expires in 30 mins independent from config settings. #178

heavydetail opened this issue Sep 4, 2018 · 9 comments
Assignees

Comments

@heavydetail
Copy link

heavydetail commented Sep 4, 2018

Hi,
see title,
Session expires in 30 mins independent from configuration settings.

How can I diagnose this problem?
The set cookies have weird expiry dates (like ~18h) which have not been set anywhere and don't seem to be logging the users in.

I am using the private-site plugin to secure the whole site.
Session sharing (log in on frontend be logged in in backend too) seems to work OK.
I am guessing the private-site plugin uses this grav-plugin-login for its login procedure,
thats why I am asking here. Even without session sharing and login via backend the same thing happens, logout in 30 mins.

What could be the cause why the session expires in ~30 mins instead of the session expiration of a week (in secs) that i set in the global grav session configuration section?
Do I have to set some session path or any other configuration (in which plugin or in the global yaml file)?
Unsure about the mechanics at play here.

It is frustrating as it happens to all my users constantly and is super annoying for quick edits on a documentation page (theme learn2-git-sync).
Its the newest Grav version (Grav v1.5.1 - Admin v1.8.9) running on Debian 9, nginx.

thanks!

@mahagr
Copy link
Member

mahagr commented Sep 5, 2018

Make sure that setenv() is allowed in your server.

@heavydetail
Copy link
Author

do you mean the linux setenv command? the PHP putenv() function or the apache_setenv? (i am on nginx)
if its the linux setenv how do i check if its allowed and for whom? www-data?
please explain.

@mahagr
Copy link
Member

mahagr commented Sep 7, 2018

I meant that PHP has a function setenv() which can be disabled in PHP configuration by not allowing it to be called.

@lufog
Copy link
Contributor

lufog commented Sep 11, 2018

@mahagr For security reasons, this feature is disabled on many webhosts.
If Grav depends on this function, this limits the list of available hosting providers...

@mahagr
Copy link
Member

mahagr commented Sep 13, 2018

@DebuggeR94 Grav, Symfony and many others depend on setenv() because of it is the only way to set most of the session settings. I can make it fall back to the more limited way for timeout, but it is not guaranteed that sessions work as intended depending on host settings.

@andr11b
Copy link

andr11b commented Sep 13, 2018

Make sure that setenv() is allowed in your server.

I tried to find something about setenv() function in PHP but found nothing. Could you explain, please, how and where can i check/enable it. I use Grav v1.5.1, Admin v1.8.9, Debian + PHP7.0 + nginx
Thanks!

@mahagr
Copy link
Member

mahagr commented Sep 13, 2018

Should be fixed in latest Grav CI build.

@mahagr mahagr closed this as completed Sep 13, 2018
@andr11b
Copy link

andr11b commented Oct 3, 2018

Unfortunately, nothing changed for me with new version...
PHP 7.0.3, nginx 1.10.3, Grav v1.5.2 - Admin v1.8.10

@mahagr
Copy link
Member

mahagr commented Oct 9, 2018

I don't know what it could be, something in your system prevents timeout from being changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants