title: PHP can't write outside of the document root no matter what
body: <p>Running a VM with CentOS 5.7 with typical httpd install.</p>
  
  <p>I'm trying to write a file to a folder outside of <code>/var/www/html</code>, lets say in <code>/var/somedir</code></p>
  
  <ul>
  <li>I've chmoded somedir with 777</li>
  <li>I chowned it to apache:apache (root:apache didn't work either)</li>
  <li>PHP's safe_mode is off</li>
  <li>PHP's doc_root is empty (i.e. <code>doc_root =</code>)</li>
  </ul>
  
  <p>I can't use <code>rename()</code> to move something out of the doc root and I can't use fwrite() to create a file outside of it either.</p>
  
  <p>Just to verify, I exec'd <code>whoami</code> from a php file and it echo'd/returned apache when accessed in the browser.</p>
  
  <p>I think I've hit google with about 200 searchs about this so far and I guess I'm still missing something.</p>