1

When following the IronCache guide, I receive a misterious code 47 trying to set any key - including the requested oauth token.

This code is not present in the PHP documentation. Is this related to the fact IronCache only supports the text protocol? If yes, how would we use IronCache as a Memcached server in PHP?

As per this answer, 47 means MEMCACHED_SERVER_TEMPORARILY_DISABLED. So what? IronCache advertises Memcache support but actually their servers are not even working?
This would not be related to their text-only protocol, since by default PHP uses the text protocol. However, I did tested forcing Memcached::OPT_BINARY_PROTOCOL to false, but it still made no differen

$cache = new Memcached;
$cache->addServer('cache-aws-us-east-1.iron.io', 11211);
$cache->set('oauth', getenv('IRON_CACHE_TOKEN').' '.getenv('IRON_CACHE_PROJECT_ID').' general', 0);
}
var_dump($cache->getResultCode()); //47 ?!
Community
  • 1
  • 1
igorsantos07
  • 4,456
  • 5
  • 43
  • 62
  • btw, nice to see they suggest searching for tags here in SO that don't even exist, like `ironcache` – igorsantos07 Dec 28 '15 at 06:29
  • This was a pet project. If it went fine, I would use IronCache in my production system as well, as it has a bigger space on Heroku. Sadly, it seems just a piece of junk, at least in PHPland. Moved to MemcachedCloud. – igorsantos07 Dec 28 '15 at 06:48

1 Answers1

0

Try to use the port 80 instead of 11211, i.e. replace

$cache->addServer('cache-aws-us-east-1.iron.io', 11211);

with

$cache->addServer('cache-aws-us-east-1.iron.io', 80);
Alex
  • 16
  • 2