Increase SESSION life in PHP

Asked

Viewed 902 times

0

I built an API using PHP to use it with Applications.

When I exit the application (without closing it or logging out) after a while the session expires disabling the activity in the application and returning errors.

How do I make this session not expire or increase its lifespan?

  • According to the PHP manual, this should be done! https://secure.php.net/manual/en/function.session-cache-expire.php

  • Wait, the session is PHP, used on the server. Do not use session in an API. How you did the validation?

  • Yes, I use it in hybrid application. HTML, CSS and javascript files. Doing asynchronous synchronization with AJAX. In turn I am using the app, I can use the session because it is an id generating, a session generated for such "browser", but in app function. Login, password, identifiers, work. But like I said, if I leave - take about 20-30min - the session expires.

  • I got it. I’ll respond with a way to increase the session time of PHP, but honestly I find this form of sessions with apps strange. But anyway... See if it works

  • 1

    Thank you, so answer I will try.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.