Hello all, I am missing the temporary folder on my server. Thats way i not upload some photos to my server.
Is the anyone have the same problem ?
Here is the code i am use :
<?php
$command=$_POST["command"];
If($command == "") {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>File Uploading Interface</TITLE>
</HEAD>
<BODY>
<CENTER>
<BR><BR>
<FORM ENCTYPE="multipart/form-data" NAME=MyForm ACTION="" METHOD="POST">
<INPUT TYPE="hidden" NAME="command" VALUE="1">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10000000000">
<TABLE>
<TR>
<TD>Choose File</TD>
<TD><INPUT NAME="MyFile" TYPE="File"></TD>
</TR>
<TR>
<TD COLSPAN="2"><INPUT NAME="submit" VALUE="Upload" TYPE="submit"></TD>
</TR>
</TABLE>
</FORM>
</CENTER>
</BODY>
</HTML>
<?php
} else {
$DestinationDir = "F:\wamp\www\surveys-html/";
$DestinationFile = $_FILES['MyFile']['name'];
if (move_uploaded_file($_FILES['MyFile']['tmp_name'], $DestinationFile)) {
echo "File uploaded successfully.";
} else {
switch($_FILES['MyFile']['error']) {
case 1 : echo "1The uploaded file exceeds the upload_max_filesize directive in php.ini.";
break;
case 2 : echo "1The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.";
break;
case 3 : echo "1The uploaded file was only partially uploaded.";
break;
case 4 : echo "1No file was uploaded.";
break;
case 6 : echo "1Missing a temporary folder.";
break;
case 7 : echo "1Failed to write file to disk";
break;
case 8 : echo "File upload stopped by extension";
break;
}
}
}
?>
When I am try to upload and i get this output : 1Missing a temporary folder.
My server is Cent OS 5.2
Thanks for any help
Best regards from Xantini
Is the anyone have the same problem ?
Here is the code i am use :
<?php
$command=$_POST["command"];
If($command == "") {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>File Uploading Interface</TITLE>
</HEAD>
<BODY>
<CENTER>
<BR><BR>
<FORM ENCTYPE="multipart/form-data" NAME=MyForm ACTION="" METHOD="POST">
<INPUT TYPE="hidden" NAME="command" VALUE="1">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10000000000">
<TABLE>
<TR>
<TD>Choose File</TD>
<TD><INPUT NAME="MyFile" TYPE="File"></TD>
</TR>
<TR>
<TD COLSPAN="2"><INPUT NAME="submit" VALUE="Upload" TYPE="submit"></TD>
</TR>
</TABLE>
</FORM>
</CENTER>
</BODY>
</HTML>
<?php
} else {
$DestinationDir = "F:\wamp\www\surveys-html/";
$DestinationFile = $_FILES['MyFile']['name'];
if (move_uploaded_file($_FILES['MyFile']['tmp_name'], $DestinationFile)) {
echo "File uploaded successfully.";
} else {
switch($_FILES['MyFile']['error']) {
case 1 : echo "1The uploaded file exceeds the upload_max_filesize directive in php.ini.";
break;
case 2 : echo "1The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.";
break;
case 3 : echo "1The uploaded file was only partially uploaded.";
break;
case 4 : echo "1No file was uploaded.";
break;
case 6 : echo "1Missing a temporary folder.";
break;
case 7 : echo "1Failed to write file to disk";
break;
case 8 : echo "File upload stopped by extension";
break;
}
}
}
?>
When I am try to upload and i get this output : 1Missing a temporary folder.
My server is Cent OS 5.2
Thanks for any help
Best regards from Xantini