Views: 8.128 views
Staff,
Good afternoon.
Today I will demonstrate how to increase the session timeout (cookie) and the maximum execution time of a script in PHP using the Apache HTTP Server configuration file, .htacess, remembering that the values of the informed parameters must be in the 2nd and you can use this same directive to set various other PHP parameters. See more parameters by clicking here.
See how simple it is:
1 2 3 4 5 6 7 8 9 10 11 |
<IfModule mod_php5.c> # Definir o tempo máximo de execucao do script para 30 mins (padrão: 60s) php_value max_execution_time 1800 # Definir o tempo de expiração de sessao para 2 horas (padrão: 24 mins) php_value session.cookie_lifetime 7200 php_value session.cache_expire 7200 php_value session.gc_maxlifetime 7200 </IfModule> |
To the next!
Hug!