php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34616 Session expires within 30 minutes NOT 180
Submitted: 2005-09-23 16:06 UTC Modified: 2005-09-23 16:11 UTC
From: djmaze at cpgnuke dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.0.5 OS: Linux
Private report: No CVE-ID: None
 [2005-09-23 16:06 UTC] djmaze at cpgnuke dot com
Description:
------------
When you start a session and provide a form to fill in,
within 30 minutes the session is destroyed although the documentation says it should be 180 minutes and php.ini does contain:
session.cache_limiter = nocache
session.cache_expire = 180

NOTE: Couldn't reproduce this locally on windows, it only happens on a heavily visited productional website.

Reproduce code:
---------------
<?php
session_name('CMSSESSID');
session_start();
header('Date: '.date('D, d M Y H:i:s \G\M\T', time()));
header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
if (!isset($_SESSION['test']))
{
    echo '<form action="'.$_SELF.'" method="post"><textarea name="form"></textarea><input type="submit"></form>';
}
else
{
    echo 'session is valid and data is posted';
}
?>

Expected result:
----------------
After waiting for 30 minutes to post the data:

session is valid and data is posted

Actual result:
--------------
The formfield

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-23 16:11 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please, read the manual and the php.ini-dist file for explanations WHAT those options do and don't.
These have nothing to do with the session life time.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC