I am using PHP to connect to memcache.
I connect memcache service in the PHP code as follows:
$memcache = new Memcache;
$memcache->connect(‘127.0.0.1’, 11211); //connect to memcached server
Then when I connect to NGX server, I got 500 or 502 error.
However, if I run the memcache using php test.php directly, I can
connect to memcache server successfully.
I am using php-fpm.
Does anyone encounter the similar issue before?