php-general | 2001032
Date: 03/23/01
- Next message: Erick Papadakis: "[PHP] PHP_SELF problems!"
- Previous message: John Almberg: "[PHP] Permission denied"
- In reply to: John Almberg: "[PHP] Permission denied"
- Next in thread: John Almberg: "RE: [PHP] Permission denied"
- Reply: John Almberg: "RE: [PHP] Permission denied"
- Reply: John Almberg: "RE: [PHP] Permission denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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" <jalmberg <email protected>>
To: "PHP General List" <php-general <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: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Erick Papadakis: "[PHP] PHP_SELF problems!"
- Previous message: John Almberg: "[PHP] Permission denied"
- In reply to: John Almberg: "[PHP] Permission denied"
- Next in thread: John Almberg: "RE: [PHP] Permission denied"
- Reply: John Almberg: "RE: [PHP] Permission denied"
- Reply: John Almberg: "RE: [PHP] Permission denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

