Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

memcached - ошибка в админке


Recommended Posts

По совету хостера сайт был перенесен с виртуального хостинга в контейнер c PHP 7.4, на хостинге заказал услуг memcached. Подправил файлы

сайт на ocStrore 2.3

 

config.php

//cache
define('CACHE_DRIVER', 'mem'); // 'file', 'apc' or 'mem'
define('CACHE_HOSTNAME', '127.0.0.1');
define('CACHE_PREFIX', 'oc_');
define('CACHE_PORT', '11211');

 

и 

/system/config/default.php 

// Cache
$_['cache_type']           = 'mem'; // apc, file or mem
$_['cache_expire']         = 3600;

 

сам сайт зарилиил сильно быстрее, но вылезла ошибка в админке

Warning: Use of undefined constant CACHE_HOSTNAME - assumed 'CACHE_HOSTNAME' (this will throw an Error in a future version of PHP) in

/system/library/cache/mem.php on line 14

Warning: Use of undefined constant CACHE_PORT - assumed 'CACHE_PORT' (this will throw an Error in a future version of PHP) in

/system/library/cache/mem.php on line 14

Warning: Memcache::pconnect() expects parameter 2 to be int, string given in

/system/library/cache/mem.php on line 14

 

если меняю в

/system/config/default.php 

$_['cache_type']           = 'file'; // apc, file or mem

то админка рилииет, но сам сайт рилииет медленнее

 

Подскажите, плз, что я сгделал не ик

Link to comment
Share on other sites


Вопрос снят, добавил в

/system/config/admin.php 

 

//cache
define('CACHE_DRIVER', 'mem'); // 'file', 'apc' or 'mem'
define('CACHE_HOSTNAME', '127.0.0.1');
define('CACHE_PREFIX', 'oc_');
define('CACHE_PORT', '11211');

 

и все зарилиило

Edited by sao
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.