title: Fatal error: Undefined class constant 'OPT_CLIENT_MODE' in
body: <p>Currently the connection from my ec2- amazon ami instance to elasticache does not work</p>
  
  <p>I attempt to connect and fail with</p>
  
  <pre><code>$server_endpoint = "lolololo.olol.olol.cache.amazonaws.com";
  $server_port = 11211;
  $dynamic_client = new Memcached();
  $dynamic_client-&gt;setOption(Memcached::OPT_CLIENT_MODE, Memcached::DYNAMIC_CLIENT_MODE); 
  // it fails on previous line
  // Fatal error: Undefined class constant 'OPT_CLIENT_MODE' in
  $dynamic_client-&gt;addServer($server_endpoint, $server_port);
  $dynamic_client-&gt;set('key', 'value', 60);
  </code></pre>
  
  <p>Steps i took
  sudo yum install gcc-c++ php php-pear</p>
  
  <p>sudo pecl install myplaceontheweb.com/assets/AmazonElastiCacheClusterClient-1.0.1-PHP53-64bit.tgz</p>
  
  <p>sudo yum install php-devel</p>
  
  <p>from root:
  add </p>
  
  <pre><code>extension=memcached.so
  extension=amazon-elasticache-cluster-client.so
  </code></pre>
  
  <p>to /etc/php.d/memcached.ini</p>
  
  <p>php info says memcached is an installed part of php, i have rebooted the server after doing all of this.</p>
  
  <pre><code>sudo find . -type f -name 'amazon*.so'
  </code></pre>
  
  <p>yeilds ./usr/lib64/php/modules/amazon-elasticache-cluster-client.so 
  and it doesn't work by direct linking as an extension either</p>
  
  <p>Is there anything obvious i am doing wrong? can anyone suggest a fix?</p>