Session not working (cakephp 2.8)


#1

Hi , I have put my cakephp framework inside subdomain ,

after this my logged in session is not working ,


#2

Hi!

Could you share more information on what you have tried and the errors you are getting?


#3

I’m using cakephp version 2.8 , uploaded my code in inside a folder in named as app , app is a subdomain like app.hello.com. so after uploading my code inside this folder session stop working.
I did not understand this , is this because I have directory now /public_html/app/app/Config


#4

Cool, could you share a bit more so that someone can help you? such as what errors, what server software you are using, what his config looks like etc


#5

I’m using Nginx server . And no I did not receiving any error , my problem is after logout , I can directly access previous page, which is should not be happen, it should redirect me on login page.


#6

It’s related to cookie domain and path. Clear cookies , then use some web browser extension to see what cookies were set and for what domain. I guess you set cookie for app.hello.com and you try to delete cookie for hello.com or the other way around. Then try to logout and check cookies again. If you do not find any good solution then hacking cake session handler will be last option to try.


#7

Most modern webbrowsers (eg. Chrome and Firefox) come with this feature build in.


#8

Thank for your feedback , but it not browser specific , logout feature did not killing my session. Also after login screen when I jump on another screen session variables are lost.


#9

You meant to use browser to see if issue is related to what I mentioned.