Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    https://prnt.sc/nuobps

    these commands are supposed to be run on SSH terminal on server to check if memcached is running.

    Please create a new file on your site folder , with following code and access it , and then post the screenshot of the result.

    <?php
    
    $mem = new Memcached();
    $mem->addServer("127.0.0.1", 11211);
    //$mem->connect("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();

    Best regards,

    Thread Starter Jaso

    (@subwebsites)

    To the above file creation, was it suppose to have a name?

    File made in public_html

    https://prntscr.com/nxqpvo

    https://prntscr.com/nxqq5t

    Still failed: https://prntscr.com/nxqr8k

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    The name is not important , like test.php is enough

    If you access it , what does it output/returns ?

    Best regards,

    Hi @subwebsites ,

    The Object cache setup has two parts.
    One is installing the memcached server via SSH, and another is enabling the PHP extension which allows the PHP applications such as WordPress to communicate with WordPress.

    While it looks like your Memcached extension is enabled on PHP, The Connection Failed result is because of the Memcached Server not installed or configured.

    The script given in the above response as @qtwrk mentioned, is for testing if memcached server is installed.

    You can create it inside your public_html, and then access it from the frontend, You can create it at public_html/test.php, and then try to access yourdomain.com/test.php.

    Post the result, This will allow you to confirm if memcached server is installed.

    If it is not installed, you need to setup memcached server or ls-memcached(it is faster) on your server via SSH to make it work. This is how you can do it – https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:lsmcd:installation

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘issues’ is closed to new replies.