title: debugging move_uploaded_file in cakephp
body: <p>I am using move_uploaded_file to upload files in cakephp, this was working for a while, but suddenly it broke. (I don't seem to see any recent changes in svn that relate to this issue, so I can't just revert them).</p>
  
  <p>The problem is, move_uploaded_file is returning false, but it isn't telling me what's wrong. I tried doing:       </p>
  
  <pre><code>error_reporting(E_ALL);
  ini_set("display_errors", 1);
  </code></pre>
  
  <p>but it isn't accomplishing anything. No errors are being reported.</p>
  
  <pre><code>if (!file_exists($folder_url . '/' . $filename))
  {
      // create full filename
      $full_url = $folder_url . '/' . $filename;
      $url = $rel_url . '/' . $filename;
      // upload the file
      error_reporting(E_ALL);
      ini_set("display_errors", 1);
      $success = move_uploaded_file($file['tmp_name'], $url);
      $result['success'] = $success;
      $result['debug']['url'] = $url;
      $result['debug']['full_url'] = $full_url;
      $result['debug']['file'] = $folder_url . '/' . $filename;
  }
  </code></pre>
  
  <p>Hosting server is in ubuntu server 9.10 running LAMP, development machine is windows 7 running XAMPP</p>
  
  <p>EDIT: </p>
  
  <p>I changed the activate error reporting to before the upload and it still doesn't work:</p>
  
  <pre><code>error_reporting(E_ALL);
  ini_set("display_errors", 1);
  $success = move_uploaded_file($file['tmp_name'], $url);
  </code></pre>
  
  <p>In Cakephp Config:</p>
  
  <pre><code>Configure::write('debug', 2);
  Configure::write('log', E_ALL ^ E_NOTICE);
  </code></pre>
  
  <p>EDIT 2:</p>
  
  <p>I did a scandir on $rel_url and it shows up the files just fine</p>
  
  <pre><code>[test2] =&gt; Array
      (
          [0] =&gt; .
          [1] =&gt; ..
          [2] =&gt; 1.jpg
          [3] =&gt; 10.jpg
          [4] =&gt; 16.jpg
          [5] =&gt; 2.jpg
          [6] =&gt; 2010-12-12-0142065.jpg
          [7] =&gt; 22.jpg
          [8] =&gt; 3.jpg
          [9] =&gt; 4.jpg
          [10] =&gt; 5.jpg
          [11] =&gt; 6.jpg
          [12] =&gt; 7.jpg
          [13] =&gt; 8.jpg
          [14] =&gt; 9.jpg
          [15] =&gt; error.png
      )
  
  [debug] =&gt; Array
  (
      [url] =&gt; img/recipes/555.jpg
      [rel_url] =&gt; img/recipes
  )
  </code></pre>