# Sessions expiring too quickly

**URL:** <https://community.auth0.com/t/sessions-expiring-too-quickly/10850>\
**Category:** Get Help\
**Created:** [April 13, 2018, 5:26am UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850 "2018-04-13T05:26:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miking](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/miking/32/12765_2.png) [@miking](https://community.auth0.com/u/miking)\
**Post date:** [April 13, 2018, 5:26am UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850/1 "2018-04-13T05:26:30Z")

</div>

I’m adapting the sample PHP app to my first project, but I’m finding that users are required to login approximately every hour. Seems like the session or authentication is expiring very quickly.  
I’ve tried finding expiration settings, but the only one I can find that seems semi relevant is JWT token expression time under advanced client settings… and this is already set to 10 hours. Not having much joy finding a solution on Google or in this forum.  
Where should I be looking to adjust this to more than an hour?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [April 16, 2018, 2:35pm UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850/4 "2018-04-16T14:35:14Z")

</div>

👋 @miking I believe this is being caused by a cookie setting specific to PHP or your web server, and it’s not related to the expiration time of the JWT. Can you check in `php.ini` for a PHP session cookie lifetime setting or a similar setting that it not being overriden?

---

<div class="post-metadata">

**Author:** ![miking](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/miking/32/12765_2.png) [@miking](https://community.auth0.com/u/miking)\
**Post date:** [April 16, 2018, 11:19pm UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850/5 "2018-04-16T23:19:57Z")

</div>

Thanks @kimcodes - that was the issue. (default session.gc\_maxlifetime = 1440 in php.ini was destroying sessions after 24 minutes)

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [April 17, 2018, 12:56am UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850/6 "2018-04-17T00:56:27Z")

</div>

Great! Glad we found the issue 🙂 let us know if you need any further help.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 17, 2018, 11:08am UTC](https://community.auth0.com/t/sessions-expiring-too-quickly/10850/7 "2018-12-17T11:08:18Z")

</div>


