Dear Sir, I am using the LiteSpeed Cache Plugin, but the object cache connection failed. How does this solve the issue ?
Hello
Let’s do a simple test if memcached works on your server. Create a memcached.php
file in your website’s public_html:
<?php
$mem = new Memcached();
$mem->addServer("127.0.0.1", 11211);
$mem->set('key1', 'This is first value', 60);
$val = $mem->get('key1');
echo "Get key1 value: " . $val ."<br />";
$mem->replace('key1', 'This is replace value', 60);
$val = $mem->get('key1');
echo "Get key1 value: " . $val . "<br />";
$arr = array('aaa', 'bbb', 'ccc', 'ddd');
$mem->set('key2', $arr, 60);
$val2 = $mem->get('key2');
echo "Get key2 value: ";
print_r($val2);
echo "<br />";
$mem->delete('key1');
$val = $mem->get('key1');
echo "Get key1 value: " . $val . "<br />";
$mem->flush();
$val2 = $mem->get('key2');
echo "Get key2 value: ";
print_r($val2);
echo "<br />";
$mem->close();
Run the file and post the outcome of said request.
Dear Sir, According to your given instruction, I have sucessfully create memsache.php file in public_html folder. But the problem is not getting solved. I am running two websites in cyberpanel, The first one has passed the Object Cache Connection Test in the website. But this problem is happening in 2nd website
First website screen shot.
Post the screenshot of Litespeed cache settings (Object cache) of second website
Check the network status of memcached with command netstat -lnp | grep memcached
. Post the result here
Not solve this issue.
-
Check if both websites are using different versions of PHP
-
Enable wordPress debugging and run command as you turn object cache off and on:
tail -f /home/mywpwebsite/public_html/wp-content/debug.log
- What is result of:
systemctl status memcached