Reputation: 812
I did a multifile upload feature in one of my projects. For this I use the flash version of uploadify.
It works fine on my local dev machine and on one other server I have for testing, but it doesn't work on the production machine (of course).
After troubleshooting the problem I did find out, that the script to handle the uploading process doesn't receive all parameters in $_FILES on the problematic server.
var_dump($_FILES)
on the working machines:
["Filedata"]=>
array(5) {
["name"]=>
string(10) "simple.pdf"
["type"]=>
string(24) "application/octet-stream"
["tmp_name"]=>
string(14) "/tmp/phpTnNROo"
["error"]=>
int(0)
["size"]=>
int(60911)
}
}
var_dump($_FILES)
on the failing machine:
["Filedata"]=>
array(1) {
["name"]=>
string(10) "simple.pdf"
}
}
I don't know why, but there is not even an error number.
How could I fix that?
I use these PHP versions:
Dev Machine: PHP 5.3.15
Working Remote Machine: PHP 5.3.3
Failing Remote Machine: PHP 5.3.8
php.ini Configuration (Changed it to eliminate some configuration limit as the error source):
file_uploads = On
max_file_uploads = 200
upload_max_filesize = 1G
post_max_size = 1G
memory_limit = 256M
max_execution_time = 14000
max_input_time = 14000
Upvotes: 2
Views: 1366
Reputation: 71
Check your HTML code for form, Did you change method of your form in production server? it seems on production server the browser does not upload file at all for exmple the form code must be like:
<form method="POST" enctype="multipart/form-data">
<input type="file" name="file[]"><br />
<input type="file" name="file[]"><br />
</form>
Upvotes: 1