Reputation: 423
I am facing problem regarding uploading doc file using php. I can successfully upload PDF file. But, once I am trying to upload doc file I am having error
Array ( [name] => Array ( [0] => OSP_Internal staffs login_04062012.docx ) [type] => Array ( [0] => ) [tmp_name] => Array ( [0] => ) [error] => Array ( [0] => 1 ) [size] => Array ( [0] => 0 ) )
As we can see, tmp_name
is empty as rest of them expert. How can I fix this issue?
Upvotes: 0
Views: 230
Reputation: 3235
Error is set to one, which means the file is too big.
UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.
http://www.php.net/manual/en/features.file-upload.errors.php
You can solve it by setting this in your .htaccess
php_value upload_max_filesize 20M
php_value post_max_size 20M
Upvotes: 2