# Zf3 Distroy Session after one hour

**URL:** https://discourse.laminas.dev/t/zf3-distroy-session-after-one-hour/925
**Category:** Components & MVC
**Tags:** session
**Created:** [January 29, 2019, 5:30pm UTC](https://discourse.laminas.dev/t/zf3-distroy-session-after-one-hour/925 "2019-01-29T17:30:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jilco](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jilco](https://discourse.laminas.dev/u/Jilco)
#### Post date: [January 29, 2019, 5:30pm UTC](https://discourse.laminas.dev/t/zf3-distroy-session-after-one-hour/925/1 "2019-01-29T17:30:23Z")

</div>

Is there a way to destroy a session started after 1 hour? I made the next configs in the global.php, but the sessions are stil present after 20 seconds in the apache folder…

And the application stil uses that session…

```
return [
// Session configuration.
'session_config' => [
    // Session cookie will expire in 1 hour.
    'cookie_lifetime' => 20, 
    // Store session data on server maximum for 30 days.
    'gc_maxlifetime' => 20,
],
// Session manager configuration.
'session_manager' => [
    // Session validators (used for security).
    'validators' => [
        RemoteAddr::class,
        HttpUserAgent::class,
    ]
],
// Session storage configuration.
'session_storage' => [
    'type' => SessionArrayStorage::class
],

// ...
];
```
