php - how to reset PHPSESSID cookie for different applications hosted on the same server -
i have 2 applications aand b hosted on same server. in fact, b sub-application a, housed within subdir of a.
while master (a) application uses default php session implementation, b implements session in database. fyi.
when access application b in new browser or before having accessed a, it's cookies set fine.
however when first access a, phpsessid cookie set. when access b, cookies b doesn't set.
i clueless why phpsessid cookie set doesn't let b set of it's cookies. reverse not true.
the cookies conflicting because default set on full domain, path /
. such there precedence when 2 applications both try start session. can use session_set_cookie_params()
override default path, , such remove conflict. need manually remove 'old' cookies in browser though afterwards keep conflicting until expired otherwise.
Comments
Post a Comment