mike131 Posted November 12, 2014 Share Posted November 12, 2014 Hi, I initially had Processwire setup on a development server and that was pushed via git to our staging and production servers. The problems I am now seeing is that sometimes users get logged out after 1 or 2 saves/changes. I made sure the the folders are owned (CHOWN) by the apache server (based off the httpd.conf user and group). Please advise. Link to comment Share on other sites More sharing options...
DaveP Posted November 13, 2014 Share Posted November 13, 2014 mike131 Welcome! I had a similar issue after running my blog through CloudFlare. Is there any possibility that users' (effective) ip is changing (are they on mobile)? You can easily test/cure by editing /site/config.php $config->sessionFingerprint = false; If that cures the problem and you are happy to leave fingerprinting off, fine. If you would prefer the higher security, then find out how/why ips are changing and proceed accordingly. (For CloudFlare, for example, I set no caching on mysite.com/processwire/ in a rule thingy they have.) Link to comment Share on other sites More sharing options...
Ben Posted November 14, 2014 Share Posted November 14, 2014 One thing to rule out are the two main php variables that govern garbage collection. ; gc_maxlifetime -- this is a session keep-alive in seconds. php default is 1440, or 24 minutes. session.gc_maxlifetime = 1440 ; gc_divisor -- this will affect the probability of garbage collection executing after gc_maxlifetime has passed, it can make session expiry feel random. session.gc_divisor = 1000 You should be able to echo these out with: printf('session.gc_maxlifetime: %s', ini_get('session.gc_maxlifetime')); printf('session.gc_divisor: %s', ini_get('session.gc_divisor')); Link to comment Share on other sites More sharing options...
mike131 Posted November 18, 2014 Author Share Posted November 18, 2014 @DaveP it looks like that solved it. I changed this setting and it seems to be working so far. I am not 100% sure from the user's standpoint, but since my user's are verified authors. I think it will be okay to leave this off @Ben I will look into this as well if @DaveP's fix doesn't seem to be it. 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted November 19, 2014 Share Posted November 19, 2014 Have you checked file permission of the assets folder? Should be really high I think. (Btw.: I marked this as solved. Feel free to mark as unsolved again if Dave's fix should stop working ) Link to comment Share on other sites More sharing options...
mike131 Posted November 21, 2014 Author Share Posted November 21, 2014 Have you checked file permission of the assets folder? Should be really high I think. (Btw.: I marked this as solved. Feel free to mark as unsolved again if Dave's fix should stop working ) Checking the assets folder was my first attempt to resolve. I had the assets folder and its child directories set to 755 I also made sure the apache server user/group owned those directories as well. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now