title: CakePHP Missing Controller - but it exists
body: <p>I recently downloaded cakephp-1.3.4. I set it up on my web server. I followed the advanced installation settings. My folder structure is as follows.</p>
  
  <pre><code>/common/
    cakephp/
       app/
       etc...
  /htdoc/
  </code></pre>
  
  <p>The <code>/htdoc</code> folder is the webroot; <code>cakephp</code> resides in the <code>common</code> folder.</p>
  
  <p>I have configured the paths in index.php to point to this folder structure. I have the app up and running. I created a layout, the app has picked it up (along with all the css and images - all that works).</p>
  
  <p>I created a <code>posts_controller.php</code> in <code>cakephp/app/controllers/</code>. Now when I try to access the following page: <a href="http://localhost/posts" rel="nofollow noreferrer">http://localhost/posts</a>. I get a message that the controller cannot be found and that I should create a <code>app/controllers/posts_controller.php</code> (it already exists!).</p>
  
  <p>Also the strange thing is using the default pages_controller <strong>works</strong>. I created an about.ctp and dropped it in <code>app/views/pages/about.ctp</code>. Vising <a href="http://localhost/pages/about" rel="nofollow noreferrer">http://localhost/pages/about</a> shows up as expected.</p>
  
  <p><strong>SOLUTION:</strong></p>
  
  <p>Sam helped me solve this problem (see the long comment thread below). The problem was I had set relative paths for my ROOT folder. This messed things up. The solution is to either directly set an <strong>absolute path</strong> or call <code>realpath</code> with your relative path for it to be resolved into the right absolute path.</p>