session.gc_maxlifetime not being honoured

mkaaaay

Well-Known Member
#1
Below is a snippet from our htaccess file. Session time should be 4 hours, but we're constantly being logged out of our admin every 20 mins or something.
Why is this not being honoured?

Code:
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 90
   php_value max_input_time 120
   php_value max_input_vars 3000
   php_value memory_limit -1
   php_value post_max_size 64M
   php_value session.gc_maxlifetime 14400
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 64M
   php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 90
   php_value max_input_time 120
   php_value max_input_vars 3000
   php_value memory_limit -1
   php_value post_max_size 64M
   php_value session.gc_maxlifetime 14400
   php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
   php_value upload_max_filesize 64M
   php_flag zlib.output_compression On
</IfModule>
 

Pong

Well-Known Member
Staff member
#2
Any reason you post this in litespeed cache general? What application do you use? WordPress? Have you enabled litespeed cache plugin for your application? Doesn't happen only when lscache plugin enabled? or even not enabled?
 

mkaaaay

Well-Known Member
#5
sorry, yes is plain php website, not wordress. Sorry, for posting in this forum area, I didn't realise at the time and couldn't see how to move the post.

Nothing we've tried has worked.

NOt even putting this in the code works

ini_set("session.gc_maxlifetime", 14400);
ini_set("session.cookie_lifetime", 14400);
session_start();

lscache is not even on for this particular website, but the server is running LSWS.
 

mkaaaay

Well-Known Member
#15
here is the local site version

(probability and divisor a recent addition to try and fix this thing)

allow_url_fopen = On
allow_url_include = Off
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 600
max_input_time = 120
max_input_vars = 3000
memory_limit = -1
session.gc_maxlifetime = 14400
session.save_path = "/var/cpanel/php/sessions/ea-php73"
session.gc_probability = 1
session.gc_divisor = 100
upload_max_filesize = 8M
post_max_size = 64M
zlib.output_compression = On
date.timezone = "Australia/Sydney"
 
#16
Strange.... Have already asked support of PHP framework? You know that you can set such settings also in cPanel for each account?

btw. you can disable zlib.output_compression. Set compression in LSWS WebAdmin to get zip AND brotli compression instead.
 
Top