Questions tagged as 'session'

1
answer

Problem using $ _SESSION in PHP 7.1.10

I have two servers running PHP, one in the 5.4.45 version and another 7.1.10 . When running the files below in the same url, only the older version of PHP shows the values of the "Test" session. In the 7.1.10 version the Array is empty....
asked by 24.10.2017 / 03:41
1
answer

Login system with permission levels

I'm developing a login system with permission levels, however, at the time of logging in as administrator, on a page adm would be allowed to enter, the permission is denied. It's as if my SESSION was null, instead of adm being redirected to in...
asked by 19.04.2016 / 03:36
1
answer

How to redirect to the login page after a certain idle time in PHP?

As the title of the question says, I would like it at a set time where the user is idle, so the system will destroy the session and automatically redirect to the login page. I know that php has the function session_cache_expire () ( link ). Howe...
asked by 03.05.2016 / 22:34
1
answer

How to work a secure session in PHP using cookies so that the session does not expire when closing the browser?

In PHP, I usually work with restricted user authentication using the $_SESSION variable, however I want to change this method to cookies so that the session does not close when closing the browser. On sites like Google and Facebook, the u...
asked by 26.02.2014 / 21:03
1
answer

How to manage Session Session in C # desktop and non-web applications?

I can not find an example of using the Session object for desktop applications, all I encounter are for applications made in C # for the web with asp, etc. Does anyone know how to check if a user is authenticated in the program when opening i...
asked by 24.06.2015 / 14:18
3
answers

PHP session expires ahead of time

I'm having a problem at a session time in PHP with CodeIgniter. I was using the sessions in CI and with so many problems I decided to look for a solution to use native sessions with the CI and at first it has improved, but still it continues to...
asked by 25.02.2014 / 15:25
2
answers

Best way to make a script to logout

I am developing a system in which it is accessed with the login and password, once logged in the user has the option to log out, below my script: if(isset($_SESSION['logado'])){ session_destroy(); header("Location:index.php"); } I w...
asked by 01.09.2014 / 05:14
3
answers

How to recover user session

I wanted to just retrieve a user's session. I have a class called SystemUser , which identifies which user is logging on. In this class, I get the session and play for an object. @ManagedBean(name = "usuarioLogado") @SessionScoped public clas...
asked by 26.10.2015 / 02:08
2
answers

How to persist $ _SESSION value in select just as it was done for input?

I'm trying to get the value of select in $_SESSION to persist the search data on a system I'm doing, but I do not know how to apply this method to select . Can you help me? I will save the variables after $_POST ......
asked by 01.01.2016 / 18:20
3
answers

php session - destroy all sessions and keep only one active

Hello, I need to destroy all sessions when logging out of a system, except for just one ... would anyone know how to implement this with php? For example: Let's say I have 5 active sessions when the user is logged in: $session1 = $_...
asked by 10.08.2018 / 19:07