News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Memcached in php 8 SMF 2.0.19?

Started by spiros, January 17, 2022, 09:50:45 AM

Previous topic - Next topic

spiros

I have recently updated to php 8 and I have installed Memcached 1.5.16 but when I go to Server settings I see: SMF has not been able to detect a compatible accelerator on your server.

Arantor

memcache or memcached? The two are not equivalent (two different PHP extensions) and I don't think the newer one is supported by 2.0.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

spiros

I had tested with memcached

memcached -h
memcached 1.5.16

SMF mentions in Server settings (erroneously?):

QuoteSMF supports caching through the use of accelerators. The currently supported accelerators include:
APC
APCu
eAccelerator
Turck MMCache
Memcached
Zend Platform/Performance Suite (Not Zend Optimizer)
XCache

I can see Memcache 8 being compatible with php 8:
Quote- Version 8.x support PHP 8.x
- Version 4.x supports PHP 7.0-7.4.
http://pecl.php.net/package/memcache/8.0

And Memcached also:

https://github.com/php-memcached-dev/php-memcached/issues/466
https://pecl.php.net/package-changelog.php?package=memcached

Arantor

And that's exactly the problem. Both client packages (memcache, memcached) call the same server package, also called memcached!

Observe the difference between https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/Cache/APIs/MemcacheImplementation.php and https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/Cache/APIs/MemcachedImplementation.php

2.0 only supports the former if I remember correctly, but I think you're using the latter.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

spiros

So I should uninstall the other one or they can coexist? I wonder if anyone has it working on php 8.

Arantor

You can try installing the other, it might work. They should be able to coexist in theory but honestly... this nonsense is partly why I jumped to Redis a while ago so I didn't have to deal with this nonsense.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

spiros

Lol, yes, I remember you mentioning Redis in another one of my questions. Sadly there is no implementation for that for SMF.

Arantor

Well, I did something pretty close to usable for 2.1, but there is a 2.0 mod - https://custom.simplemachines.org/index.php?mod=4119
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

spiros


danielrichter

@spiros Just give me a few more days and I'll release my redis cache addon.
Because of the help of @Arantor I will provide it to the SMF community, we use redis in a large cluster for all of our applications, so we were in need of redis for SMF too  :) .

Advertisement: