Jump to content

file upload - permission denied


fixxxer

Recommended Posts

ive been working on a script to allow users to upload files to a directory. im testing it on my pc. i think ive finally managed to get it working but i get this error message

Warning: move_uploaded_file(../../images/covers/) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Program Files\xampp\tmp\php43C.tmp' to '../../images/covers/' in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35
file not uploaded

what i dont get is how do i change permissions on my local pc? i remember from a while back that with an ftp program i could change something called chmod on my web host but do i need to do a similar thing on my local pc or is it an error in my script.

i run windows xp media centre, xampp, if somebody could point me in the right direction. thanks
Link to comment
https://forums.phpfreaks.com/topic/10668-file-upload-permission-denied/
Share on other sites

[!--quoteo(post=377930:date=May 28 2006, 06:53 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ May 28 2006, 06:53 PM) [snapback]377930[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Try to specify the full path.

I don't think it's even possible to change the permissions under Windows.
[/quote]

if i change it to the full path i get a different error. i get this error.

Warning: move_uploaded_file(C:\Program Files mpp\htdocs\gamesdb2\images\covers) [function.move-uploaded-file]: failed to open stream: Invalid argument in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Program Files\xampp\tmp\php440.tmp' to 'C:\Program Files mpp\htdocs\gamesdb2\images\covers' in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35
file not uploaded

if someone can offer an idea of how it dont work id be grateful. thanks
[!--quoteo(post=377949:date=May 28 2006, 07:55 PM:name=fixxxer)--][div class=\'quotetop\']QUOTE(fixxxer @ May 28 2006, 07:55 PM) [snapback]377949[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if i change it to the full path i get a different error. i get this error.

Warning: move_uploaded_file(C:\Program Files mpp\htdocs\gamesdb2\images\covers) [function.move-uploaded-file]: failed to open stream: Invalid argument in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Program Files\xampp\tmp\php440.tmp' to 'C:\Program Files mpp\htdocs\gamesdb2\images\covers' in C:\Program Files\xampp\htdocs\gamesdb2\user_add\processes\upload_cover_image.php on line 35
file not uploaded

if someone can offer an idea of how it dont work id be grateful. thanks
[/quote]
can anybody explain this error, says permission denied, ive tried everything to getit work i ve chnged the direction of the / and now it says failed to open stream permission denied. can any one offer any advice

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.