• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session not stored (memcached)

#1
Hi!

I have a problem with reading the data from session (using memcached). So I am developing a chrome app which is created with pure HTML + JS (AngularJS). This app is sending the requests to the backend (PHP CI 3), for specific tasks (login, register, logout, ...). Maybe worth of mention is that I am using the Async chrome.storage to save some data directly on client. Everything works fine while using the Chrome app.
Because I want to run that app also on Android, I need to replace this chrome.storage with synchronous window.localStorage which can be used in every webpage. So that is the only difference between them.
So if I want to test this app/webpage with window.localStorage I need to run it like a normal page obviously, and not like the Chrome app. So I am running this with "grunt serve" method which creates some server that is running that page on http://localhost:9000/#. So If I send the request to the server now from that webpage, the session is stored and read properly at the first request. But when I send the second request, the session is lost.

Do anyone have a clue what can be wrong here? Or at least how can I debug this memcached session data?

Thank you very much in advance!
Reply

#2
Are you sure the problem is memcached? This type of problem occurs a lot with third-party cookie sessions. Something similar might be occurring with your app. Let us know how you eventually resolve this issue?

(02-23-2016, 07:45 AM)sasos90 Wrote: Hi!

I have a problem with reading the data from session (using memcached). So I am developing a chrome app which is created with pure HTML + JS (AngularJS). This app is sending the requests to the backend (PHP CI 3), for specific tasks (login, register, logout, ...). Maybe worth of mention is that I am using the Async chrome.storage to save some data directly on client. Everything works fine while using the Chrome app.
Because I want to run that app also on Android, I need to replace this chrome.storage with synchronous window.localStorage which can be used in every webpage. So that is the only difference between them.
So if I want to test this app/webpage with window.localStorage I need to run it like a normal page obviously, and not like the Chrome app. So I am running this with "grunt serve" method which creates some server that is running that page on http://localhost:9000/#. So If I send the request to the server now from that webpage, the session is stored and read properly at the first request. But when I send the second request, the session is lost.

Do anyone have a clue what can be wrong here? Or at least how can I debug this memcached session data?

Thank you very much in advance!
Reply

#3
Actually it isn't working also with normal PHP session not only memcached, so no, memcached is not the problem obviously.
The thing is, i tried to make the request with POSTman app with chrome, and the session is normally stored. Only for my specific client which I also tried to run with NGINX (The same NGINX configuration works for some other clients).
Of course I will let you know about solution, but I have a feeling that it is not going to that way for now.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.