I have spent hours trying solve this issue but nothing worked. I am trying to upload a csv file of size 0.5 kb.
This is my html form:
<form action="" method="post" enctype="multipart/form-data"><input type="file" name="file"><input type="submit" value="Upload"></form>The $_FILES array remains empty after submit:
var_dump($_FILES); // array(0) { }The $_POST array receives the name of the csv file:
var_dump($_POST); // array(1) { ["file"]=> string(11) "numbers.csv" }From the php.ini file: (bottom two are commented out in the file)
file_uploads = Onupload_max_filesize = 2Mmax_file_uploads = 20;upload_tmp_dir =;sys_temp_dir = "/tmp"Perms on /var/tmp folder (if relevant)
drwxr-xr-x 8 root root 4096