php - session / cookie issues codeigniter 1.7.2 -
hi i’m finishing project , i’m having issues ci. i’m running version 1.7.2 , i’m using ci session class setting , getting session data.
this happens in firefox , ie. what’s weirder application only works in chrome. have verified happening in older builds of application didn’t have issues previously.
here’s config:
session
$config['sess_cookie_name'] = 'ciprojectname'; $config['sess_expiration'] = 7200; $config['sess_encrypt_cookie'] = true; $config['sess_use_database'] = true; $config['sess_table_name'] = 'sessions'; $config['sess_match_ip'] = true; $config['sess_match_useragent'] = true; $config['sess_time_to_update'] = 900;
cookies
$config['cookie_prefix'] = ""; $config['cookie_domain'] = ""; $config['cookie_path'] = "/";
i played adding cookie domain issue still happens. i’ve read time syncing issue server time i’ve tried on multiple servers. guess first thing @ why ci work in 1 browser , not others.
any appreciated.
update
i never described issue in detail:
when try access /controller/method it'll reload current page , nothing. if add /controller/method/ <-- forward slash, render next page.
my guess firefox , ie resetting session data between loads. in cases caused server settings. guess worked fine on localhost , having problems once moved remote server.
first, find problem. must pinpoint problem occurs. suggestions:
check server log see how date being set. year 0000. if servers have same version of php problem. known bug php versions. https://bugs.php.net/bug.php?id=48276
if no, database getting session data? if yes, can watch data move page page see if session being reset. if so, server settings issue.
if no, check browser security settings. once moved localhost, there security issue.
if no, try changing default
$config[‘sess_expiration’] = 43200;
recommend work when there issue dropping sessions.if no, change sess_match_ip false , try in firefox , ie. goes along browser setting issues.
if problem still not clear, usa reduction test - minimum code needed recreate problem. create single controller “setsession” , “readsession” function. try reloading page in each browser see if session renews. @ server log , database. if works culprit seem data being sent in session problem browsers not like.
the underlying issue 1 or more of following:
a. invalid character in session data
b. server time settings
c. security settings in ie , firefox (if server changed localhost)
d. problem date bug in php
if still having problems, may time consider using native session library: http://codeigniter.com/wiki/native_session/
it seems problem prevalent made custom class ci sessions: http://www.philsbury.co.uk/blog/code-igniter-sessions may worth shot.
hope helps.
Comments
Post a Comment