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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to