3

I know this question might be a bit obscure, and might not even be in the right stack exchange. So I'm going to start here.

I'm running flask and flask-session with redis

My app config is setting the SESSION_TYPE to 'redis'

I'm also using u-msgpack-python for compatibility with PHP vs pickle in flask_session/session.py (manually changed in the dist-packages), but this seems to have no bearing on whether it works or not.

When running this configuration on Debian 9 or Ubuntu 16.04 everything works just fine. (Also Python 3.4, or 3.5, and PHP 7.0, and Apache or Nginx (both work))

However, when I run the exact same code base on Ubuntu 18.04 with Python 3.6 it will not hold the session.

The session cookie name is PHPSESSID and key prefix is PHPSESSID:

But.. when I change the cookie name to something like MYSESSID it all works and holds the session on Ubuntu 18.04. As soon as I change it bask to PHPSESSID, it fails to hold the session.

I've monitored the Redis server and I can see the session come in with data, so I know it's communicating properly.

Other info:

Running: Nginx 1.14.0, Python 3.6, Ubuntu 18.04, PHP 7.2

Any direction or insight will be helpful. Perhaps it's the PHP version?

Feel free to change tags as necessary, or ask for more info and I will provide as I can. I have full root access to the server.

CodeLikeBeaker
  • 20,682
  • 14
  • 79
  • 108

0 Answers0