Jump to content
Sign in to follow this  
Markus (Blue Tomato)

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://"
session.save_handler = memcached
session.save_path = ""

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...