Cless Posted July 26, 2008 Share Posted July 26, 2008 Hi. Several of my users are having cookie issues on my website; no cookies are being set, and therefore they cannot login. Typically, this occurs mostly with users that utilize Internet Explorer or a PSP. I'm not sure if a PSP allows cookies or not, though. I've asked most of these people to allow cookies on their browser, along with Javascript, however it does not appear to be functioning. Is there something I can do to fix this? This is the code that sets the cookie: setcookie("User_ID", "$UD_UserID", time()+99999); Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/ Share on other sites More sharing options...
.josh Posted July 26, 2008 Share Posted July 26, 2008 perhaps they are not properly setting their browser to allow cookies, despite you telling them to allow them? I don't think there's anything else you can do, except maybe provide detailed instructions on how to allow it for their browser. I'm not sure whether psp allows cookies or not, either... I guess your only alternative is to redesign your system to not use cookies at all. edit: a quick google search shows that psp does indeed allow cookies and there's no special "method" to setting them and allowing them from the menu is pretty straight forward. Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600406 Share on other sites More sharing options...
Cless Posted July 26, 2008 Author Share Posted July 26, 2008 Okay, thank you. I may use sessions as an alternative, however I am not sure if they are safe, and I am not sure what the lifetime of a session is. Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600425 Share on other sites More sharing options...
MFHJoe Posted July 26, 2008 Share Posted July 26, 2008 Sessions are pretty safe. They only last as long as the client's browser is open though. So if a user shuts down their computer for example, the session is gone. Which is why most websites make use of a mix of sessions and cookies. I can't help you with the cookie problem though, seems strange... Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600427 Share on other sites More sharing options...
.josh Posted July 26, 2008 Share Posted July 26, 2008 umm, well sessions are a hell of a lot more secure than cookies... but they do only last for as long as the browser is open so if you are looking for something more permanent you will have to store information in a flatfile or database on the server. But fyi even sessions use cookies by default the session id is stored in a cookie on the client so you will have to look into using sessions without cookies (basically you pass the session id through the url or temp store it in a flatfile or db) Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600428 Share on other sites More sharing options...
Cless Posted July 27, 2008 Author Share Posted July 27, 2008 All right, sounds good! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600601 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.