Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Cannot use memcached at php 7.0 because of missing Memcache #100

Open
pohlaniacz opened this issue Aug 31, 2017 · 6 comments
Open

Cannot use memcached at php 7.0 because of missing Memcache #100

pohlaniacz opened this issue Aug 31, 2017 · 6 comments

Comments

@pohlaniacz
Copy link

Hi, I can't install php5-memcache because it's not available at Debian with php 7.0, so I'm getting an error "Memcache extension is not loaded! To configure pools it MUST be loaded!". Of course memcached extensions is loaded properly, how can I fix/bypass this?

@mevdschee
Copy link
Contributor

@pohlaniacz I'm afraid you can't because there is a memcache and a memcached (with a "d") extension. The memcached extension is not supported. You may have to install the memcache extension via PECL.

@pohlaniacz
Copy link
Author

I know it, but I though that there is a workaround or I'm missing something. .

@skoop
Copy link

skoop commented Mar 26, 2018

I'm running into this as well, and installing memcache via PECL seems to not be that easy on PHP 7.1. Given the memcache extension is sort of deprecated, is there any chance of a newer version of this bundle using memcached?

@mevdschee
Copy link
Contributor

mevdschee commented Mar 26, 2018

Given the memcache extension is sort of deprecated

Is it? Do you have a reference?

any chance of a newer version of this bundle using memcached?

I tried hard to implement it, but without much luck. Some of the object interfaces of memcached are not fully PHP compatible (parameters that are references and optional if I recall correctly).

I think you are better of with memcache than with memcached. Also memcached does (or at least did) not support windows users (AFAIK).

@skoop
Copy link

skoop commented Mar 26, 2018

memcache extension is not packaged with PHP anymore, and if you try to build it on PHP 7.1 you get errors because some PHP header files are renamed in PHP7.

For now I've solved the problem by using a fork of the memcache extension that is still maintained (https://github.com/websupport-sk/pecl-memcache) but as you can see from the official PECL page the last release was in 2013: http://pecl.php.net/package/memcache.

This means I've now been able to upgrade our development docker containers to PHP 7.1 with the above memcache extension, but I'm not sure if our sysadmins will be willing to upgrade production to such a fork.

Memcached on the other hand still has a recent release (and pretty regular updates anyway): http://pecl.php.net/package/memcached

It might be worth looking at re-implementing Memcached support. I've unfortunately not got enough time for it in the upcoming weeks to have a look at this but will see if my client has some time to free up to experiment with this.

@mevdschee
Copy link
Contributor

mevdschee commented Mar 26, 2018

memcache extension is not packaged with PHP anymore

Nor is or was the php memcached extension.

Memcached on the other hand still has a recent release

But is notoriously known for it's bad support on Windows.

It might be worth looking at re-implementing Memcached support.

AFAIK distributions (such as Debian and Centos) have chosen to build and include the beta versions (of php-memcache). So IMHO you better invest time in getting official builds of php-memcache out, then to rework this package from one sub-par dependency to the other. Honest advice, really :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants