![]() |
Cookie not being set - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cookie not being set (/showthread.php?tid=8378) |
Cookie not being set - El Forum - 05-15-2008 [eluser]europe72[/eluser] I am in the process of moving a site from a development environment to a production environment. On the production environment, when I start a session, no cookie is set and I can't seem to figure out why. --> I am using the standard CI session handling. Dev works, production does not. Session info is being written to the DB, just no cookie. Any ideas? I did check phpinfo on the prod. box and sessions are enabled with the usual settings. From config... $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 1800; // :30 $config['sess_encrypt_cookie'] = TRUE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = TRUE; $config['sess_match_useragent'] = TRUE; From phpinfo... session Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /var/lib/php4 /var/lib/php4 session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off Cookie not being set - El Forum - 05-15-2008 [eluser]europe72[/eluser] Maybe I should rephrase this...what in CI could stop a cookie from being written? Thanks. Cookie not being set - El Forum - 05-15-2008 [eluser]europe72[/eluser] I actually figured this one out myself. The issue in this case, for me was that the server time was behind my client time by enough seconds to cause the browser to reject/delete my cookie at the time it was set. |