Jump to content


Photo

file upload - permission denied


  • Please log in to reply
3 replies to this topic

#1 fixxxer

fixxxer
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 28 May 2006 - 11:47 PM

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

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 28 May 2006 - 11:53 PM

Try to specify the full path.

I don't think it's even possible to change the permissions under Windows.
~ D Kuang

#3 fixxxer

fixxxer
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 29 May 2006 - 12:55 AM

[!--quoteo(post=377930:date=May 28 2006, 06:53 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ May 28 2006, 06:53 PM) View Post[/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

#4 fixxxer

fixxxer
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 29 May 2006 - 11:19 AM

[!--quoteo(post=377949:date=May 28 2006, 07:55 PM:name=fixxxer)--][div class=\'quotetop\']QUOTE(fixxxer @ May 28 2006, 07:55 PM) View Post[/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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users