I write a php file to operate the memcached, but it connect to memcached failed. I execute the code successfully in windows. But when I deploy the code to Linux. Then I test the code by Chrome, it failed. But if I execute the code by command line,it succeed. I have no idea about it. If you know how to solve it, please tell me. I will thank you too much. Code:
<?php
$opCache = new Memcache();
var_dump($opCache->connect('10.0.8.68', 11211));
$opCache->add('key', 'value', false, 3000);
$opCache->close();
?>
windows configuration Apache
Linux configuration nginx