title: Using memcache with PHP
body: <p>I want to start using memcache with PHP (on Ubuntu 9.10). There are lots of info online which appear to show how to do this. Suprisingly though, none of the articles (I have seen so far), explicitly state whether you need to RUN the memcache process BEFORE attempting to use it or whether by simply calling new MemCache() via the PHP client library, a process will be spawned (if not already running).</p>
  
  <p>From the various docs I have read on this so far, these are the steps that I think make sense:</p>
  
  <ol>
  <li>Install memcache on your machine (there are several docs showing how to do this)</li>
  <li>Modify your php.ini file and set the memcache related consts/flags to the values that make sense for your environment</li>
  <li>Create an init script in ini.d to start memcache as a daemon</li>
  <li>Restart Apache daemon</li>
  </ol>
  
  <p>Number 3 is the part that I need confirmation on, because none of the docs I have seen so far mentions the lifespan of the memcache process.</p>
  
  <p>Can someone experienced in this confirm if this is the correct steps?
  Also if I have missed a step, let me know.</p>
  
  <p>As an aside, since I am relatively new to Linux, I would be grateful if someone could post an example of an init script that would be needed to run the memcache daemon process (assuming that the steps I have outlined above are correct)</p>