nickd_101 Posted October 20, 2006 Share Posted October 20, 2006 Hi,I've developed a website on a local PHP server, and have just uploaded it to my webspace. I have a script that resizes and uploads images to the server for display on various articles. However, when a user uploads an image file the following error is displayed:Warning: move_uploaded_file(images/user/johnny.JPG): failed to open stream: Permission denied in /home/onestops/public_html/add_property.php on line 131Warning: move_uploaded_file(): Unable to move '/var/tmp/phpvK4cZK' to 'images/user/johnny.JPG' in /home/onestops/public_html/add_property.php on line 131The corresponding code is:$imagedetails= "main";$image_caption = $_POST['image_caption'];$image_username = $Property_ID;$image_tempname = $_FILES['image_filename']['name'];$today = date("Y-m-d");//upload image and check for image type$ImageDir ="images/user/";$ImageThumb = $ImageDir . "thumbs/";$ImageName = $ImageDir . $image_tempname;if (move_uploaded_file($_FILES['image_filename']['tmp_name'], $ImageName)) {//get info about the image being uploadedlist($width, $height, $type, $attr) = getimagesize($ImageName);Can anyone see any solutions to the problem, as i've had help from the space provider (startlogic) but i can't see any problem with the code?Thanks for the help,Nick Link to comment https://forums.phpfreaks.com/topic/24565-error-moving-converted-image-on-webserver/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.