title: PHP error when using simple file upload script: failed to open stream: No such file or directory
body: <p>I'm a PHP n00b but followed the instructions as per this excellent tut:</p>
  
  <p><a href="http://www.tizag.com/phpT/fileupload.php" rel="nofollow">PHP Tizag file upload tutorial</a></p>
  
  <p>However, whilst this worked perfectly on my Mac (OSX 10.8) running the default built-in Apache, it fails and doesn't work on a CentOS 6 box. Looking through the Apache logs I get this:</p>
  
  <pre><code>failed to open stream: No such file or directory
  </code></pre>
  
  <p>The permissions have been set to <strong>777</strong> on the "uploads" folder which is in the root of <strong>/var/www/html</strong>  (on the mac it's /Library/Webserver/Documents)</p>
  
  <pre><code>[Tue Apr 30 13:05:11 2013] [error] [client (My IP Address)] PHP Warning:  move_uploaded_file(uploads/Today notes.txt): failed to open stream: No such file or directory in /var/www/html/test/uploads3.php on line 8, referer: ht*p://serverip.myserver.com/test/form4.html
  
  [Tue Apr 30 13:05:11 2013] [error] [client (my IP address)] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/phpc8AGo8' to 'uploads/Today notes.txt' in /var/www/html/test/uploads3.php on line 8, referer: ht*p://serverip.myserver.com/test/form4.html
  </code></pre>
  
  <p>Am I missing some setting in PHP or Apache to enable this to work properly?</p>
  
  <p>Many thanks in advance.</p>