fixxxer Posted May 28, 2006 Share Posted May 28, 2006 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 messageWarning: 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 35Warning: 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 35file not uploadedwhat 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 Quote Link to comment https://forums.phpfreaks.com/topic/10668-file-upload-permission-denied/ Share on other sites More sharing options...
poirot Posted May 28, 2006 Share Posted May 28, 2006 Try to specify the full path.I don't think it's even possible to change the permissions under Windows. Quote Link to comment https://forums.phpfreaks.com/topic/10668-file-upload-permission-denied/#findComment-39805 Share on other sites More sharing options...
fixxxer Posted May 29, 2006 Author Share Posted May 29, 2006 [!--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 35Warning: 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 35file not uploadedif someone can offer an idea of how it dont work id be grateful. thanks Quote Link to comment https://forums.phpfreaks.com/topic/10668-file-upload-permission-denied/#findComment-39823 Share on other sites More sharing options...
fixxxer Posted May 29, 2006 Author Share Posted May 29, 2006 [!--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 35Warning: 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 35file not uploadedif 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 Quote Link to comment https://forums.phpfreaks.com/topic/10668-file-upload-permission-denied/#findComment-39915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.