Hello group,

I have a very strange issue coming up when uploading large files ( about
30MB). The problem is it works fine on my computer (and two others that I've
tested), but it doesn't work on my client's laptop. It comes up with error
code - 0 (which is upload successful), but the actual file is not on the
server. Here is my error checking code:

if ($sizeOK && $typeOK) {
        switch($_FILES['items']['error'][$number]) {
                case 0:
                        if(!file_exists(UPLOAD_DIR.$file)) {
                                $success =
move_uploaded_file($_FILES['items']['tmp_name'][$number], UPLOAD_DIR.$file);
}
                        else {
                                $success = 
move_uploaded_file($_FILES['items']['tmp_name'][$number],
UPLOAD_DIR.$postDate.$file);    
                                $cp = true;

                        }
                                                
                        if ($success) {
                                $result[] = "$file uploaded successfully";
} 
                        else {
                                $result[] = "Error uploading $file. Please
try again.";
                        }
                        break;
                case 3:
                        $result[] = "Error uploading $file. Please try
again.";
                default:
                        $result[] = "System error uploading $file. Contact
Webmaster.";
        }
}
elseif ($_FILES['items']['error'][$number] == 4) {
        $result[] = 'You chose not to add this file.';
}
else {
        $result[] = "$file cannot be uploaded. Maximum size: $max.<br />
Acceptable file types: pdf and mp3.<br />Error number: " .
$_FILES['items']['error'][$number]."<br />";
}
=====================================

So for some reason on his computer it doesn't go to the switch statement
(case 0), but goes to the very last else statement. 

So he always get this message:
>bigfiles.mp3 cannot be uploaded. Maximum size: 51,000.00KB.
>Acceptable file types: pdf and mp3
>Error number: 0

Yet, it always seems to work when I do it on my computer.

Any insight into this issue would be very helpful.

Thank you.

Anna Vester



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to