How do I configure PHP to have permission to create directories and make files?
<p>I have a PHP script that receives uploads and it works fine in mamp, creating directories and receiving files as necessary, but when I move it to the server it errors out saying it can't do either.</p>

<p>[EDIT]
To be clear, the script will received a file and before storing it, it may need to create a directory for that file beneath itself. So the pseudo code would be...</p>

<pre><code>$path = getNewPath();
mkdir("./$path", RECURSIVE);
fwrite($path/$newFile);
</code></pre>

<p>I've chowned the file to apache and given it 777 permissions, but no dice. I'm assuming that there must be some PHP configuration that designates this, but can't figure out where that is.  httpd.conf is lengthy and, having skimmed it, I don't see anything relevant. </p>

<p>I'm sure I'm missing something obvious, but can't figure out what it is.</p>

<p>TIA</p>
