gerkintrigg Posted May 25, 2006 Share Posted May 25, 2006 Hi I'm having a problem with my image upload script...It's showing an error:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: copy(../../../../shop/uploaded_images/m2kencode23.gif): failed to open stream: Permission denied in /hsphere/local/home/davetrig/magic2k.com/admin/shop/edit/item/got_image.php on line 95Could not copy, please use the back button to try again.[/quote]This is my code...[code]if ((in_array($_FILES['imagefile']['type'], $image_types)) && ($_FILES['imagefile']['size'] < 600000)) {copy ($_FILES['imagefile']['tmp_name'], $root."shop/uploaded_images/".$_FILES['imagefile']['name']) or die ("Could not copy, please use the back button to try again."); $_SESSION['imgurl']='shop/uploaded_images/'.$_FILES['imagefile']['name']; echo "<BR><BR>Thank you, the following image was uploaded:<BR><BR><img src='".$root.$_SESSION['imgurl']."' [/code]That's some of it anyway... I think that the error's in there somewhere (if it is a script error)...Can anyone advise?Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/10433-image-upload-problem/ Share on other sites More sharing options...
wisewood Posted May 25, 2006 Share Posted May 25, 2006 Looks like you dont have the right permissions for the directory where you're saving the file. Quote Link to comment https://forums.phpfreaks.com/topic/10433-image-upload-problem/#findComment-38918 Share on other sites More sharing options...
gerkintrigg Posted May 25, 2006 Author Share Posted May 25, 2006 Yeah, that's what i thought, but the permissions are set fine...Perhaps my firewall settings? Quote Link to comment https://forums.phpfreaks.com/topic/10433-image-upload-problem/#findComment-38924 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.