dannon Posted May 31, 2013 Author Share Posted May 31, 2013 (edited) Bumping for justice! Should I post my website on GitHub and post the URL here? Or my whole site isn't needed? Edited May 31, 2013 by dannon Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 31, 2013 Share Posted May 31, 2013 (edited) the code you posted for putting the dot in front of the domain parameter was shown for a session_set_cookie_params() statement. did you do the same for the set_cookie() statement? and, if this problem is because of url's having/not having the hostname in front of the domain name, you should be - A) consistent in your coding throughout your site B) have a redirect in your .htaccess file to send all requests to one hostname variation of your domain name. Edited May 31, 2013 by mac_gyver Quote Link to comment Share on other sites More sharing options...
dannon Posted May 31, 2013 Author Share Posted May 31, 2013 (edited) the code you posted for putting the dot in front of the domain parameter was shown for a session_set_cookie_params() statement. did you do the same for the set_cookie() statement? and, if this problem is because of url's having/not having the hostname in front of the domain name, you should be - A) consistent in your coding throughout your site B) have a redirect in your .htaccess file to send all requests to one hostname variation of your domain name. Yea, I put a dot before the domain for all of my cookies now, I use this: where DOMAIN, is set to my website's domain name (example.com). $domain = ($_SERVER['HTTP_HOST'] == "localhost." ? false : "." . DOMAIN); I have made it so my .htaccess redirects to the URL without the "www.". I have also made sure that my website only redirects to URLs without a www. It still breaks. Edited May 31, 2013 by dannon Quote Link to comment Share on other sites More sharing options...
dannon Posted June 1, 2013 Author Share Posted June 1, 2013 (edited) I have found that if I remove the PHPSESSID cookie and spam click on a link, the cookie breaks. Has this been causing the issue all along? Are there too many requests sent while the session isn't properly set or something? and the cookie isn't set on the client, while the website thinks it's updated? If so, is it possible to fix this? Edited June 1, 2013 by dannon Quote Link to comment Share on other sites More sharing options...
dannon Posted June 1, 2013 Author Share Posted June 1, 2013 I'm going to make it so it checks the last 5 cookie tokens from the database instead of the last cookie. Is it possible to make sure that only 5 tokens of 1 user_id exists in the database? Could someone help me rewrite a query for this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.