RE: [PHP] Having trouble with Uploading Files to Server...
| From: | Pablo Gosse | Date: | Wed, 05 Nov 2003 16:06:20 +0000 |
| Subject: | RE: [PHP] Having trouble with Uploading Files to Server... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168581@lists.php.net to get a copy of this message | ||
On Wednesday, November 05, 2003 8:03 AM, Dimitri wrote:
> I'm trying to allow users to upload files to my server. I have the
> appropriate code (I think) but I'm getting this error message. Can
someone
> tell me why, and how to fix this?
>
> Warning:
> move_uploaded_file(/home/unit-
> dir/public_html/members/memberpix/dimitrihomel
> ess.gif): failed to open stream: Permission denied in
> /home/unit-dir/public_html/members/updatehomepage.php on line 36
>
> Warning: move_uploaded_file(): Unable to move '/tmp/php9PUwlg' to
> '/home/unit-dir/public_html/members/memberpix/dimitrihomeless.gif' in
> /home/unit-dir/public_html/members/updatehomepage.php on line 36
> Couldn't upload first image
Hi Dimitri. Check the permissions on the directories you're working
with. The user which php runs as (usually apache or nobody) needs to be
able to write to the directories to which you are trying to upload the
files (both the temp directory and the final location).
Cheers,
Pablo