Help Required Immediately - URGENT

but its not < 3mb… GOD

First your MAX_UPLOAD_SIZE is defined as 3000000 which is only 2.86MB not 3.0 MB remember its 1024 bytes in a kilobyte and 1024 kilobytes in a megabyte. so 3MB is 102410243 or 3145728

Still the w3g im trying to upload is just 276kb and its not being uploaded giving that error, there’s something wrong with the replacements u gave me, I tried undoing the change, works like a charm.

ok then this is solved?

Nope, no changes have yet be made…

So it does not work like a charm, since your not checking for file type and still have the issue of your site being taken down.

Here is the code I use to upload 2MB pdfs every day. does all the checking and moving yours does in 10 less lines

[php]
// verify PDF file type
// verify file size less than 2 MB
if (($_FILES[“file”][“type”] == “application/pdf”) && ($_FILES[“file”][“size”] < 2097152)) {
// verify that the file is not currupt
if ($_FILES[“file”][“error”] > 0) {
echo “Return Code: " . $_FILES[“file”][“error”] . “
”;
} else {
// File Upload
if (file_exists(“upload/” . $_FILES[“file”][“name”])){
echo “
<span style=“color:ff0000”>”.$_FILES[“file”][“name”].” already exists. Please complete the Application again with a unique file name.";
} else {
// moves file to uploads folder
move_uploaded_file($_FILES[“file”][“tmp_name”], “upload/” ./substr($_FILES[“file”][“name”],0,-3)."."./$fname.".".$lname.".".$zip.".".$gpa.".pdf");
echo “
Stored in: " . “upload/” ./substr($_FILES[“file”][“name”],0,-3)."."./$fname.”.".$lname.".".$zip.".".$gpa.".".$phone.".pdf";
}
}
} else {
echo “Invalid file”;
}

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service