Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600406
Share on other sites

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...

Link to comment
https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600427
Share on other sites

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)

Link to comment
https://forums.phpfreaks.com/topic/116753-solved-cookie-issues/#findComment-600428
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.