CodeIgniter Forums
Problem set cookies on PHP server development mode - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Problem set cookies on PHP server development mode (/showthread.php?tid=63212)



Problem set cookies on PHP server development mode - arma7x - 10-08-2015

Currently, I'm working to store cookie on PHP server development mode using cookie helper, but failed. I put the domain name '.localhost:8000', 'localhost:8000', '127.0.0.1:8000' & '.127.0.0.1:8000'. All of domain I listed doesn't work. Do some browser doesn't allow to store cookie on localhost?? Or any solution to this problem??


RE: Problem set cookies on PHP server development mode - InsiteFX - 10-08-2015

It depends on the OS you are running Windows Mac etc;

But for cookies on a local host the default config always works.
If your running Windows then you need to set the browsers to allow third party cookies.


RE: Problem set cookies on PHP server development mode - Narf - 10-08-2015

localhost:8000 is not a domain ... it's a domain and a port.

I'm not sure if that's allowed to work, so it may be your problem.


RE: Problem set cookies on PHP server development mode - arma7x - 10-08-2015

I map 127.0.0.1 to localhost.com. Using linux(Netsurf Web Browser) both ci_session and my custom cookies works. But on windows, Mozilla Firefox does not detect any cookies, and Google Chrome only detect ci_session. All test under domain localhost.com:[port]