Chrome Set Cookie Localhost
How does "Exile and return to battlefield" work with a Manifest What could cause humanity to migrate from land to water? Join them; it only takes a minute: Sign up Codeigniter, xampp cookies not setting up vote 0 down vote favorite I'm using the codeigniter with xampp on a windows 7 PC. The whole time I was trying to set a cookie (but not retrieve it) and it worked with the other browser. php codeigniter cookies xampp share|improve this question asked Aug 28 '13 at 2:01 Eric 59141029 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote According to Check This Out
Loading Login Register FAQ Search It is currently Wed Nov 16, 2016 3:02 pm View unanswered posts | View active topics Board index All times are UTC - Old cartoon or anime featuring a girl protected by a Red Robot Texas, USA speed ticket as a European citizen, already left the country Higher up doesn't carry around their security I was having trouble with IE and Chrome, but not FF, Opera or Safari (on a WAMP system). share|improve this answer answered May 2 '11 at 3:49 Elyas 301139 this is impossible scenario.
Chrome Set Cookie Localhost
But when I uploaded it to the live server, the cookies not working at all. Simplify list of rules Why do Internet forums tend to prohibit responding to inactive threads? I'm using PHP Cookies to save user preferences. Not the answer you're looking for?
I thought it was standard practice to set a domain for cookies. Join them; it only takes a minute: Sign up setcookie() does not set cookie in Google Chrome up vote 29 down vote favorite 9 I am going through some PHP tutorials Also for me it seems to depend on the server whether or not setting a cookie domain will work in Chrome –Abhi Beckert Mar 2 '15 at 23:55 add a comment| Localhost Cookies Not Working Board index All times are UTC - 5 hours Powered by phpBB Forum Software © phpBB Group
Try this: setcookie("settings", serialize($defaultSettings), 0); Setting expiration to zero will fix your issue in this case. I thought maybe it's related to the $expire time zone like the one's in this post http://anupraj.com.np/index.php/php-cookies-not-working-php-cookie-tutorial-and-scirpt/14 . I set the following up in my config.php: $config['cookie_domain'] = "http://localhost"; $config['cookie_path'] = "/"; And changed to $this->input->set_cookie('userID', $userID, 259200); and it's still not setting at all. Are we in a low CO2 period, compared to the last 590 million years?
For example, in PHP: setcookie( $AUTH_COOKIE_NAME, $cookie_value, time() + cookie_expiration(), $BASE_DIRECTORY, null, false, true ); Here the value null indicates that the domain should not be set. Php Setcookie Not Working Chrome See if you get the same results. –Brad F Jacobs May 1 '11 at 14:53 @alex I just tried example 1 from the PHP docs (tried the 1st and What a wonderful hack. :) –Mark Amery Apr 25 '13 at 12:15 add a comment| up vote 11 down vote Domain should be equal to NULL. & Should be given an Use http://myproject.localhacks.com/ (which points to 127.0.0.1).
Chrome Set-cookie Not Working
Three Dots inside Round
See also: https://code.google.com/p/chromium/issues/detail?id=56211 Ways to work around the issue include: Set a local domain (e.g., edit /etc/hosts to use 127.0.0.1 localhost.com). Cookie Not Set In Php How do you deal with a picky eater on a backpacking trip? However Chrome's cookie inspector continues showing "This site has no cookies".
Or try opening the page "inPrivate" (Ctrl+Shift+P).
Should I be concerned about "security"? Not the answer you're looking for? share|improve this answer answered Dec 13 '10 at 10:20 Silver Light 14.5k1984130 Hey, thanks for your clue. Cookies Not Setting share|improve this answer edited Dec 22 '12 at 1:45 Dave Jarvis 16.7k25106207 answered May 1 '11 at 15:41 Mike West 3,9601422 Brilliant!
Browse other questions tagged php codeigniter cookies xampp or ask your own question. Is a north-facing window recommended outside of the northern hemisphere? I had the same problem and it worked share|improve this answer answered Apr 12 '12 at 11:35 Sahin Yanlık 4192417 add a comment| up vote 0 down vote I faced the http://trisystech.net/not-working/yslow-chrome.html Here's the cookie code: $this->input->set_cookie('userID', $userID, time()+259200, 'http://localhost', '/'); After running this and on every page, I've included print_r($_COOKIE); to see any/all cookies that are being set, but nothing shows up.
Use an empty domain value when setting the cookie. asked 5 years ago viewed 4436 times active 2 years ago Upcoming Events 2016 Community Moderator Election ends in 6 days Blog How We Make Money at Stack Overflow: 2016 Edition I also managed to find the list of cookies stored in Chrome's settings (Options > Under the Hood > Content Settings > All cookies and site data) and finally found the What should I do about this security issue?
Extract result of Reduce when solving an inequalities What power do I have as a driver if my interstate route is blocked by a protest? share|improve this answer answered Mar 20 '14 at 14:02 Nabeel 8015 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Note: not setting the domain prevents the cookie being visible to sub-domains. The PHP file was served from XAMPP (localhost).
Everything's works very well, including the cookies. Thank you so much.