Hi everyone,
I've got the following code:
function failureCallback($host, $port) {
print "memcache '$host:$port' failed";
}
$this->memcache = new Memcache;
## bool Memcache::addServer ( string $host [, int $port = 11211 [, bool $persistent [, int $weight [, int $timeout [, int $retry_interval [, bool $status [, callback $failure_callback [, int $timeoutms ]]]]]]]] )
$this->memcache->addServer('192.168.1.35', '11211', FALSE, 50, 10, 10, TRUE, 'failureCallback' );
The server is online and running (verified!), but the Failure callback function is being called at each connection. Why is that?
Reference:
PHP documentation: Memcache::addServer -> failure_callback
Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted. The function takes two parameters, the hostname and port of the failed server
Edit: Updated post with correct number of parameters before the callback function, but without any luck :(