i am trying to upload an image(windows xp mypicture winter.jgp to be specific)to a folder in a server which has permission 705 . Now the problem is its getting type 3 error every time . Searching in the net i have found out that it s actually partially file uploaded error . But could not find any reasons . Can anyone point anything where i can come to know why this problem is happening?Thanks in advance.
is there any other issue you think other than the permission issue cause most of the files are uploaded using the same script and same permission . But with this file and few other are not uploaded at all.
This code is a bit complex to be posted here . I am explaining what i am doing . I have a HTML form which has action set and target to a iframe . As soon as the form is posted the form is not shown to be posted everything is hidden to the user. Now in the back end i have got ajax running to see how much the file have been uploaded but in the ajax file i checked the fily type,size(these were set in the session) and found null . Then I keep the entire $_POST["upload"] in the session and checked from the ajax file and found that it has type 3 error set.Any ideas what might have cause the problem?
Do you have enough space left? How big is the file? But you should really post your code, because all we can do is guess...
<form name="upload_form" id='upload_form' method="post" enctype="multipart/form-data" action="includes/Imageupload.php" target='iframe_upload'> <input type="file" name="filetosave" class="upload" value="Paracourir" size="15" /><input type="hidden" name="hfiletosave" /> <iframe name="iframe_upload" src="" width="400" height="20" style="display:none;border:none;"> </iframe> </form> in the image upload page: if ($_FILES["filetosave"]["type"] != "image/gif" && $_FILES["filetosave"]["type"] != "image/jpeg" && $_FILES["filetosave"]["type"] != "image/jpg" && $_FILES["filetosave"]["type"] != "image/bmp" && $_FILES["filetosave"]["type"] != "image/png" && $_FILES["filetosave"]["type"] != "image/pjpeg") { $_SESSION['invalid_file']=0; $_SESSION['chknow']=2; } elseif (file_exists("../upload/files/".$_FILES["filetosave"]["name"])) { @unlink("../upload/files/".$_FILES["filetosave"]["name"]); $_SESSION['invalid_file']=1; ; } elseif($_FILES["filetosave"]["size"] > 2048000 || $_FILES["filetosave"]["size"] == 0) { $_SESSION['invalid_file']=0; $_SESSION['chknow']=2; $_SESSION['Error_type']="Size Biggger"; } else { $_SESSION['invalid_file']=1; $_SESSION['chknow']=1; } if($_SESSION['invalid_file']==1){ if (!file_exists("../upload/files/".$_FILES["filetosave"]["name"])) {move_uploaded_file($_FILES["filetosave"]["tmp_name"],"../upload/files/".$_FILES["filetosave"]["name"]); } i am posting the code only for this image upload issue.
i forgot the submit button code to post which post this form <input type="button" id="bouton_submit" value="Importer" onclick="upload_image(2)" onmouseover="changeButton(this,'bouton_submit_on')" onmouseout="changeButton(this,'bouton_submit')"/>
i am really getting trouble with this, i have uploaded the same file with this same script in a different server which i have 777 permission but not in my desired server which has 705 permission. unfortunately if i try to change the permission to 777 it changes to 705 again. Please help me any ideas?
ok now i have bypassed all the ajax part of it and made a simple form that uploads data now still i am having type 3 error can any body help me with that.