When I was trying to send a file via the HTML form, I saw “error=3” in the $_FILE variable, what means:
UPLOAD_ERR_PARTIAL – The uploaded file was only partially uploaded.
The php_sapi_name() function returned me ‘apache2filter’.
I removed libapache2-mod-php5filter and installed libapache2-mod-php5.
Now php_sapi_name() returns ‘apache2handler’ and files uploading works good now 🙂