Search the Community
Showing results for tags 'session'.
-
In my PW-Application there is currently no session timeout. I want to set the user session to 60 minutes which means that after 60 minutes of inactivity the user will be redirected to the homepage. so I added the following entry to my config.php: $config->sessionExpireSeconds = 120;...
-
Hi, I'm using the Database Session Handler the first time with a site and have noticed that the no more used sessions get not deleted automatically. They get deleted when I'm logged in and go to Setup -> Sessions. Is this normal behave or is there something wrong with the server the site is runnin...
-
Hi, I want to redirect users that hit 1) pages using a specified template 2) when the url is using a specific syntax. Url syntax is: /PRODUCT/redir/PAGEID Example: /foo/redir/1234 My intention is to redirect the user to the specified PAGEID - but I don't know how to user $input in...
-
Hi, after redirect to payment page processwire session lost because of samesite cookies changed default to "lax". https://web.dev/samesite-cookies-explained/ tried to hook session::init but not works ? $wire->addHookBefore("Session::init", function (HookEvent $event) { ini_set('session.c...
-
How do you guys handle large session tables when sessions are being recorded to the database? I notice one of my sites has a session table of over 14MB Am I missing a way in the Admin or a module to auto-remove any sessions older than X days? Thanks
-
Hello all, I am using part of a PW install as a backend for a RESTful API. Everytime a client consumes the API, a session is started. The RESTful approach is sessionless per definition and I would like to avoid sessions, if possible, for performance reasons. When I look at the open sessions wh...
-
Hello, I'm facing a weird issue here. I have a page loaded with this code inside (my comments in line ends) : if ($session->allPlayers) { // Set in a head.inc file. I have also a $session->set('allTeams', $allTeams); in my head.inc $allPlayers = $session->allPlayers; } else { $allPlay...
-
If I have two PW sites that sit in separate folders, I can't be logged-in in both sites. e.g. site.com/project-a/pw-admin-slug/ site.com/project-b/pw-admin-slug/ If I login to project-a, then also login to project-b, get back to the first site, I have to login again. Is the...
-
Greetings. I am here to share my first module. I make this module because I cannot find one to suit my need. I like SessionHandlerDB but I do not want to use mysql database to store session for performance. So, Redis seems to be the best choice. I have tried to use netcarver's SessionHandlerRedis bu...
-
I have a demo site which I moved to a new VPS for client testing We noticed that leaving a page open and then revisiting the site can result in a 25 second(ish) to load time and will then throw a 500 Error. The hosting guys had a look and confirmed that the server is fine but the issue cou...
-
Hello, after creating an array and assigning it to a variable in session: $order = array (); $order['token'] = 'token'; $order['product'] = 'product-name'; $session->order = $order; I try to insert another item: $session->order['price'] = 'price'; But it doesn't work: Not...
-
Hi guys, I'm trying to setup my first login form. Once connected the user will able to access the other part of the website. I've read many topics about session from which I've learned a lot but I still can't figure if sessions are files based, database based or cookie based ? I've re...
-
Strange behavior with Session and debug mode [SOLVED]
Jarden Black posted a topic in General Support
Hi everyone, [edit: do not loose your time reading this post, I solved it by disabling cache in the Pages2Pdf module... sorry ?] I do not know if I should post on the Pages2Pdf thread or here. Mods, feel free to move the post.... -
Hi everyone, [edit: do not loose your time reading this post, I solved it by disabling cache in the Pages2Pdf module... sorry ?] I do not know if I should post on the Pages2Pdf thread or here. Mods, feel free to move the post. Since three days I am scratching my head to...
-
I've used this code on another site (same web host) and it all works fine. When a visitor lands on a page and they're not logged, the page name/path/url/httpUrl (tried them all) is saved to a session var. Code in _init.php is: $loginPage = pages( 1085); if(!$user->isLoggedin() && $page->id...
-
Hi, On my website the user is able to choose between to styles of a gallery. A gridview and a stripe view. I want to store the choice during the whole session. So if the user chooses a style I do it like so: $query = $_GET['view']; if($query){ $session->set('view', $q...
-
Is there a way to restrict logins for users so that one user can't be loggedin in two places at the same time? e.g. auto logout user after inactivity (of say 15 minutes..?), or logout action and disallow login if user still "logged in" somewhere?
-
Hello there! I want to create a user front-end (user can register/login/logout via templates) I'm working based on the intermediate site profile. So _init.php is loaded first, then the template file and then _main.php. I integrated the custom login as described here, and changed it to...
-
Hello, When do you choose to use $input->whitelist($key, $value) rather than $session->myvar (with myvar = 3 for example) ? The documentation uses the example of the MarkupPagerNav module : "An example is the MarkupPagerNav plugin module, which provides an easy way for you to have pag...
-
Hi all. Perhaps this is just my fault, but I can't get behind it :-( When I store an array in a $session and want to read its contents – after a $session->redirect() – it is NULL by var_dump() If I use the exact same code and just store a string or a Page ID the output is correct. // f...
-
At the top of each of my main pages, I want to redirect to my login page if the session is timed out. How can I use the PW API to test for this? $user->isLoggedin() doesn't seem to do it, like I expected. THX