*2018-10-29
compiled with:
- php-src 7.2.11 tag
- memcache 3.0.9 NON_BLOCKING_IO_php7 shared
- Fix memcache session handler with two backend servers Fatal Error (out of memory)
- Patch with pull #26 to fix issue #23 Failed to read session data with 7.1/7.2
- MSVC 15.8.8 / 19.15.26732.1
- Window Kit 10.0.17134.0
- php-sdk-binary-tools 2.1.9 tag
Dependencies
CFLAGS add:
LDFLAGS add:
Just put in your php.ini something like:
session.save_handler = memcache
session.save_path = "tcp://127.0.0.1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
- https://github.com/php/php-src/tree/PHP-7.1.8 php-7.1.8
- https://github.com/websupport-sk/pecl-memcache/tree/NON_BLOCKING_IO_php7 3.0.9
- Fix memcache session handler with two backend servers Fatal Error (out of memory). https://bugs.php.net/bug.php?id=73539
2016-05-18 : I’ve noticed 2 bugs when implementing memcache session.handler for
session.save_handler = memcache
session.save_path = "tcp://127.0.0.1:11211"
- With
memcache.protocol = ascii
, there is some random lock onsession_start()
according tomemcache.lock_timeout
so i've setmemcache.lock_timeout = 1
but that doesn’t resolve the problem (just makes it less visible..) - With
memcache.protocol = binary
, first bug seems not appearing but session destroy failed ! All that test have been done with phpmyadmin which write complex data in session
So you can find MemcacheSessionHandlerPrepend.php
a MemcacheSessionHandler implementing SessionHandlerInterface to add to your php.ini
with config:
session.save_handler = user
auto_prepend_file = c:/path/to/MemcacheSessionHandlerPrepend.php
; session.save_path =
See issue #23 and discution on stackoverflow
MSVC14 discontinued. Update only MSVC15
Only tested (and working fine) on x64 nts.
Require Redistribuable Microsoft Visual C++ pour Visual Studio 2017
See my memcache.ini
configuration