Guys,
Good afternoon.
Today I will demonstrate how to increase the session expiration time (cookie) and the maximum execution time of a script in PHP using the Apache HTTP Server configuration file, .htaaccess, remembering that the values of the informed parameters must be in seconds and you can use this same directive to configure several other PHP parameters. See more parameters by clicking here.
See how simple it is:
<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>
Until next time!
Hug!
Comentários (0)
Carregando comentários…