Don't forget, PHP (in general) runs as the webserver (normally "nobody" or
"apache" for Apache servers). Make sure your webserver has write access to
/home/jalmberg/public_html/qiksys/images/
adamw
----- Original Message -----
From: "John Almberg" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Friday, March 23, 2001 2:50 PM
Subject: [PHP] Permission denied
> Hi all,
>
> I'm trying to upload a file from a client browser to my server.
>
> On the client side, I've got:
>
> <FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD=POST>
> <!-- <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000"> -->
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
> </FORM>
>
> On the server side, I've got:
>
> echo ("$userfile<br>");
> echo ($HTTP_POST_FILES['userfile']['name'] ."<br>");
> echo ($HTTP_POST_FILES['userfile']['type'] ."<br>");
> echo ($HTTP_POST_FILES['userfile']['size'] ."<br>");
> echo ($HTTP_POST_FILES['userfile']['tmp_name'] ."<br>");
>
> if (move_uploaded_file($userfile,
> "/home/jalmberg/public_html/qiksys/images/temp.jpg"))
> print("moved file");
> else
> print("couldn't move file!");
>
> When I try to use this, I get:
>
> =============================
> /tmp/phpa21470
> test.jpg
> image/pjpeg
> 21917
> /tmp/phpa21470
>
> Warning: Unable to create
> '/home/jalmberg/public_html/qiksys/images/temp.jpg': Permission denied in
> /home/jalmberg/public_html/qiksys/upload.php on line 57
>
> Warning: Unable to move '/tmp/phpa21470' to
> '/home/jalmberg/public_html/qiksys/images/temp.jpg' in
> /home/jalmberg/public_html/qiksys/upload.php on line 57
> couldn't move file!
> ==============================
>
> I check the php.ini file and safe mode is turned off. I've also tried with
a
> text file, same result. I have permission to access the above directory .
.
> . the php files working this magic are located in
> /home/jalmberg/public_html/qiksys.
>
> Probably there is a simple answer to this question, but I'm out of ideas!
> Any help???
>
> Thanks in advance.
>
> John
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]