Jump to content

Search the Community

Showing results for tags 'cookie'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 7 results

  1. Hi all, I have problems to keep my session on different subdomains (including www). I've set the following config: $config->sessionCookieDomain = '.mydomain.net'; $config->sessionCookieSecure = false; But it doesn't work, I always loose the session when I switch between www.mydomain.net and example.mydomain.net. Could it be because both of them have a different SSL-Certificate? (https) Thanks for any help! Dennis
  2. Hello, I'm loosing the session when I quit my browser (it's not lost when I close/reopen the tab). Is there a way I can keep my PW session after a browser restart ? I use the session->login usual stuff to start one. Thanks
  3. Hi guys, I'm hitting a "too_many_redirect" problem on a test I was doing by forcing my browser to not accept any cookies : if (!$session->lg) { echo "session not set<br>"; $lg = 'en'; $session->lg = $lg; echo $session->lg; // I see 'en' $url = $page->localHttpUrl("$lg"); echo $url; // I see the good URL : http://www.mywebsite.com/en $session->redirect("$url"); } else { echo "session set<br>"; exit; } I never hit the 'else' case and my browser eventually stops working and display a too_many_redirection error. How can I detect the $session->lg hasn't been saved correctly ? Thanks
  4. A client of mine is having an issue whereby Processwire is not remembering their logged in status. As part of the site, they are sent an email telling them there has been an update on the site. When they click the link, Processwire determines that they are not logged in and sends them to the log in page. When they log in, they get sent to the home page, rather than the link they clicked in the email. Does Processwire not create a session cookie? It seems fine for me - I can visit /processwire hours later and it remembers me. Also, if the user has purposely logged out, is there a way to remember the requested URL and redirect to it once the user has logged in?
  5. The $session feature is easy to use and great to store inputs like currency or cart items temporary on server side. Identified by client cookie ID. I thought the session lifetime works persistent. But the wire cookie is only valid until the browser will be closed. Next visit starts always with a fresh session. All vars got lost. Session file is still on server, but access impossible without cookie ID. Is there anyone way to change the client session cookie lifetime from "expired if browser closed" to maybe "current time plus 48h"? I could create a second beside the "wire" cookie to store things at client side. But all data will saved in client browser directly. The concept to identify via cookie but data always on server is better and more secure. And one cookie is better as two. Which alternative way would you prefer to store some vars for "guest" role users more persistent?
  6. Hello, part of my new project is providing a RESTful webservice through PW. I am using clsource's REST Helper for ProcessWire which is working great. For the REST service part of the site I would like to suppress the setting of session cookie for $session->login and $session->logout because I don't need sessions and I don't want to have Set-Cookie in my response header. For user authentication in a PUT request I use $session->login() to verify username and password: $uId = $input->urlSegment1; $u = $users->get($uId); if ($session->login($u->name, $params["upass"])) { $session->logout(); //update user data } In the response header for that request I get: Set-Cookie: wire=ha6io723mkfc9v4scdib3oe8g7; path=/; HttpOnly wire=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT wire=1n8faeiva3vg7u13ijsrs24bt1; path=/; HttpOnly wire_challenge=YK0WRw0Wrd2ZAhKEUCLPOHd9iSySEPb91; expires=Tue, 07-Apr-2015 14:11:24 GMT; path=/; httponly wire=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT wire=u9m41s8b87d3ca1jp1jbl0r6k3; path=/; HttpOnly wire=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT wire=oidcbmht561qnvts2fjnq4b7p3; path=/; HttpOnly persist=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/ At the moment I get rid of it by doing header_remove("Set-Cookie"); But I would like to avoid setting of that cookie in the first place. I found the relevant methods ___login and ___logout in /wire/core/Session.php But searching Captain Hook for "logout" doesn't bring up those methods. I assume they should be hookable because they start with 3 underscores. Now how would I hook into those methods from my template file (not as an autoload module)? The webservice endpoint url is .../api/users/ and my temlate file for that is users.php What I've tried so far is wire()->addHookBefore('Session::logout', null, 'logoutNoCookie'); function logoutNoCookie($event) { $event->replace = true; $sessionName = session_name(); $_SESSION = array(); // if(isset($_COOKIE[$sessionName])) setcookie($sessionName, '', time()-42000, '/'); // if(isset($_COOKIE[$sessionName . "_challenge"])) setcookie($sessionName . "_challenge", '', time()-42000, '/'); session_destroy(); session_name($sessionName); $this->init(); session_regenerate_id(true); $_SESSION[$this->className()] = array(); $user = $this->wire('user'); $guest = $this->wire('users')->getGuestUser(); $this->wire('users')->setCurrentUser($guest); $this->trackChange('logout', $user, $guest); if($user) $this->logoutSuccess($user); $event->return = $this; } But this gives me an error: Fatal error: Using $this when not in object context because I'm placing my hook function outside the class context. What would be the correct way for calling the hook and placing my hook function?
  7. Sorry about the somewhat confusing title! I'm trying to set up an "info bar" where the client can add a bit of information right at the top of the screen which can be closed using jQuery. Despite my awful jQuery skills, I've managed that part. I'm just a bit confused as to the best way to handle subsequent pages. Could I do this in PW alone using cookies or session? Or would I need to trigger something else in JS when the close button is pressed? Also is there any acceptable CSS fallback for closing the info bar if there's no JS (I'm guessing maybe just refresh the page?) Thanks in advance if anyone has any ideas how they'd handle this. Screenshot attached
×
×
  • Create New...