php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47175 ini_set('session.gc_maxlifetime','86400') does not respond to the change of tim
Submitted: 2009-01-21 00:25 UTC Modified: 2009-01-21 02:40 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: webmaster at e-taller dot com dot ar Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.6 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: webmaster at e-taller dot com dot ar
New email:
PHP Version: OS:

 

 [2009-01-21 00:25 UTC] webmaster at e-taller dot com dot ar
Description:
------------
trate de cambiar el tiempo en que caduca la sesion mediante ini_set asi "ini_set('session.gc_maxlifetime','86400')", esta claro que al recargar la pagina session.gc.maxlifetime retorna al valor del php.ini, despues de setearlo para 1 dia en todas las paginas que tenian session_start() no logre que tomara el valor que yo he puesto siempre toma el del php.ini.
mi pregunta es porque pasa esto?
se puede realmente mediante ini_set cambiar el valor de session.gc.maxlifetime?

de ser asi me podrian decir como es.

gracias de ante mano.

Reproduce code:
---------------
ini_set("session.gc_maxlifetime","86400");

Expected result:
----------------
que cambie session.gc.maxlifetime a 1 dia

Actual result:
--------------
session.gc.maxlifetime no toma cambios mediante ini_set

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-21 00:43 UTC] webmaster at e-taller dot com dot ar
no cambia el tiempo de caducidad
 [2009-01-21 01:39 UTC] scottmac@php.net
The primary language for bug reporting is English.

But I think what you are asking is that if you can set the cleanup for sessions via ini_set, the answer here is yes. Though you'd need to set it for EVERY script that uses sessions as any script can go through and clean up the files.
 [2009-01-21 02:40 UTC] webmaster at e-taller dot com dot ar
ok, I did not know what the English language 
I changed all the pages you have session_start () 
the value of session.gc.maxlifetime and only takes the php.ini.

thank you for answering
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC