Sign in to follow this  
tiefenbacher_bluetomato

Parallel Fileupload broken with Sessions in Redis or Memcached

Recommended Posts

I'm looking for some help with Sessions in Redis and Memcached.

First, I discovered this issue in the third-party module SessionHandlerRedis from @netcarver

After reading more about Session in PHP with Redis, I found that PHP can handle this (and also with memcached) out of the box without any third party module.

I tried it with Redis and memcached so in this cases I added following to my php.ini

session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379"
session.save_handler = memcached
session.save_path = "127.0.0.1:11211"

Everything went well and sessions were saved to redis/memcached in both methods.

..... but:

The only thing what does not work, was the upload of multiple files at once. So when I upload two images, only the image which are last finished are saved to the database. In the JSON response of the AJAX upload request, the page-id of the file where in both files the same id. Sometimes with memcached the response failed because the response was no valid JSON and the response was the login page of processwire.

I opened an issue in processwire-issues but @ryan hasn't worked with this kind of session handling since yet: https://github.com/processwire/processwire-issues/issues/798

 

Does any body uses Redis or memcached as session handling and has also found this bug?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.