title: Connecting and Testing Memcached with PHP
body: <p>after spending some time trying to setup Memcached on MAMP I can came into a bit of a pickle... </p>
  
  <p>On my php info file it states memcached and displays the relevant information:
  <img src="https://i.stack.imgur.com/FSoRU.png" alt="Image of php info file"></p>
  
  <p>In order to learn and use Memcached I was using the following tutorial:
  <a href="http://net.tutsplus.com/tutorials/php/faster-php-mysql-websites-in-minutes/?search_index=1" rel="nofollow noreferrer">http://net.tutsplus.com/tutorials/php/faster-php-mysql-websites-in-minutes/?search_index=1</a></p>
  
  <p>This is where I encountered my first issue, this being connecting to the Cache Server: by using what they had stated, did not seem to work.</p>
  
  <pre><code>define('MEMCACHED_HOST', '127.0.0.1');
  define('MEMCACHED_PORT', '11211');
  $memcache = new Memcache;
  $cacheAvailable = $memcache-&gt;connect(MEMCACHED_HOST, MEMCACHED_PORT);
  </code></pre>
  
  <p>I tried changing 127.0.0.1 to localhost, this did not work. My first point of call was to change memcache to memcached... This still did not work. </p>
  
  <p>Therefore I just want to clear up how to connect and test a connection has been made with Memcached. If there is in fact a different connection between Memcache and Memcached? Or maybe I have set something up wrong? Any advice or guidance is appreciated :)</p>