disable memmcached in php 8
This commit is contained in:
parent
5b8e138bfd
commit
361ea6b0b9
2 changed files with 13 additions and 2 deletions
|
@ -192,7 +192,12 @@ else if($_REQUEST['action'] == 'caching')
|
|||
|
||||
// assign
|
||||
$bm_prefs['memcache_servers'] = str_replace(';', "\n", $bm_prefs['memcache_servers']);
|
||||
$tpl->assign('memcache', class_exists('Memcache') || class_exists('Memcached'));
|
||||
if((int)str_replace('.', '', phpversion()) >= 800) { // In PHP 8 we will disable memcached
|
||||
$tpl->assign('memcache', false);
|
||||
}
|
||||
else {
|
||||
$tpl->assign('memcache', class_exists('Memcache') || class_exists('Memcached'));
|
||||
}
|
||||
$tpl->assign('page', 'prefs.caching.tpl');
|
||||
}
|
||||
|
||||
|
|
|
@ -353,7 +353,13 @@ class BMCache_memcache extends BMCache
|
|||
$memcacheServers = explode(';', $bm_prefs['memcache_servers']);
|
||||
if(class_exists('Memcache') || class_exists('Memcached'))
|
||||
{
|
||||
if(count($memcacheServers) > 0 && trim($memcacheServers[0]) != '')
|
||||
if((int)str_replace('.', '', phpversion()) >= 800) { // In PHP 8 we will disable memcached
|
||||
PutLog('PHP 8 or higher detected. memcache is disabled. Please choose an other cache method or contribute your code changes to the community.',
|
||||
PRIO_WARNING,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
}
|
||||
else if(count($memcacheServers) > 0 && trim($memcacheServers[0]) != '')
|
||||
{
|
||||
if(class_exists('Memcache'))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue