Error when i turn on memcached

When I modify  “/pub/ub-tool/protected/config/cache.php” and turn on memcached 
++ comment out multiple lines from 6 -> 8
++ un-comment the lines from 11 -> 20
 

<?php
/**
* Cache settings
*/
//Option 1: Use file cached
//return array(
// ‘class’ => ‘CFileCache’
//);
//Option 2 -- use php memcached
return array(
‘class’=>’CMemCache’,
‘servers’=>array(
array(
‘host’ => ‘127.0.0.1’,
‘port’ => 11211,
‘weight’ => 60,
),
)
);
 
The module does not work.
 

The memcached is working in the domain. You can see the screenshots and i create a script test

View post on imgur.com



http://magentoplesk.visualpublic.es/mem.php
If you reload the url you can see that memcached saves data.
Thanks regards.
 
 
 
 

9 answers

Profile photo of Mall Staff 184060.00 $tone May 19, 2017
Public

Hi there,
that because you have not install php memcached as our guide. 
To install php memcache, you could follow this post: http://devdocs.magento.com/guides/v2.0/config-guide/memcache/memcache_ubuntu.html
In case you can’t install that, you don’t need enable that option. And you can continue with our tool.
Regards,
Mall.
 

#1
Profile photo of Sergio B 340.00 $tone August 1, 2017
Public

I’m facing the same problem.
 
It’s because Ubertheme extension uses MEMCACHE without D, which is currently dead (latest beta upgrade was in 2013 and stable version in 2012)
The working one and alive is memcached, which supports PHP 7 (memcache does not support PHP 7)
 
Mall please tell us if you are gonna upgrade to memcached because memcache is completly absurd for Magento 2.

#2
Profile photo of Mall Staff 184060.00 $tone August 1, 2017
Public

Hi there,

PHP 7 (memcache does not support PHP 7)

Yes that is right but it was ready with phpmemcahed (with a d), our tool were tested and working fine with:

  • PHP 7.0.21-1~ubuntu14.04.1+deb.sury.org+1
  • PHP memcached v3.0.3 (not is memcache): http://prntscr.com/g30ua2

A quote form Magento devdocs:

  • The exact name is php5-memcache for Ubuntu and php-pecl-memcache for CentOS
  • memcached (with a d), a newer and maintained extension that should be compatible with PHP 7.

You could see more at HERE
FYI,
Mall.
 
 

#3
Profile photo of Sergio B 340.00 $tone August 1, 2017
Public

Hello Mall, nothing.
I already run the Magento php test to check if you have memcached php extension and memcached server working and works, all correct, but your extension stills with the same error as OP.
I have the same memcached php extension version as you
memcached server with 1.5.0 version
PHP 7.0.12 FPM
 
Actually, after the installation of memcached php extension, only SASL and Session supports are in “YES”. igbinary, json, and msgpack are in “NO”, and in your screenshot this is different. There’s no reference about this in magento doc.

#4
Profile photo of Mall Staff 184060.00 $tone August 2, 2017
Public

Hi there,

I have the same memcached php extension version as you
memcached server with 1.5.0 version

No, as my first reply the php memcached in my local is v3.0.3: https://prnt.sc/g30ua2
You could view this video which captured from my local: https://drive.google.com/open?id=0B4UfTo5yHHTKQlk4am9QMWktbm8
If you still can’t use phpmemcached at your end, you should use cache file by default settings of our tool.
Regards,
Mall.

#5
Profile photo of Sergio B 340.00 $tone August 2, 2017
Public

Hello Mall
You have a memcache 3.0.9-DEV php extension installed at the same time as memcached 3.0.3 php extension, the memcache one from a non-oficial source. As you can see in the official repo, there’s no 3.0.9 version because it’s dead.
 

No, as my first reply the php memcached in my local is v3.0.3

I think you’re confusing the PHP extension with the server. Please run memcached -i to view your memcached server version. Mine is 1.5.0 (latest), your’s should be equal.
Please try to uninstall memcache php extension (without d) and try to run magento backend again. Send us a video if you want. I’m thinking that the problem is here, we don’t have memcache forks installed and it’s not appropiated. As you can see in the error, it requires you memcache not memcached, so I still think that your code is prepared to work with some memcache php extension classes. 
 

you should use cache file by default settings of our tool.

It’s slow! We are minimum knowledge people that want to improve the work, and your tool tries it!

#6
Profile photo of Mall Staff 184060.00 $tone August 2, 2017
Public

Hi there,

I’m thinking that the problem is here, we don’t have memcache forks installed and it’s not appropiated. 

Yes, you are right. If you want to using phpmemcahe in php7.0 you should install the version 3.0.9-dev at this time (http://prntscr.com/g3i4h8 )
As you see our tool was working fine in php7.0 with that phpmemcahe version.
Regards,
Mall.

#7
Profile photo of Sergio B 340.00 $tone August 3, 2017
Public

I don’t understand you, you told me that I cannot use Docker because it’s not supported but you advice me to use a non-oficial port made by an unknown guy of a dead php extension… The solution is to update your classes and adapt to memcached not to memcache. 

#8
Profile photo of Mall Staff 184060.00 $tone August 3, 2017
Public

Hi there,

The solution is to update your classes and adapt to memcached not to memcache. 

Our tool used Yii framework, and that is an issue of the Yii core for that case (php7.0 with phpmemcache).
For a temporary workaround, to use stable version of phpmemcahe with our tool, please consider switching to php5 with phpmemchae v3.0.8 during the data migration process only. Once the data migration is completed, you can switch back to PHP 7 for Magento 2 as normal.
Regards,
Mall. 

#9

Please login or Register to Submit Answer

Written By

Comments