Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

PHP $_FILES array remains empty after file upload

$
0
0

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

Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>