I want to upload a csv file with a form but if the file is too big (> 200 rows) it doesn't work.
For instance, when I upload a big file and I do:
die(var_dump($request->files->get('file')));
Here is the result:
object(Symfony\Component\HttpFoundation\File\UploadedFile)#9 (7) { ["test":"Symfony\Component\HttpFoundation\File\UploadedFile":private]=> bool(false)
["originalName":"Symfony\Component\HttpFoundation\File\UploadedFile":private]=> string(12) "big_file.csv"
["mimeType":"Symfony\Component\HttpFoundation\File\UploadedFile":private]=> string(24) "application/octet-stream"
["size":"Symfony\Component\HttpFoundation\File\UploadedFile":private]=> int(0)
["error":"Symfony\Component\HttpFoundation\File\UploadedFile":private]=> int(1) ["pathName":"SplFileInfo":private]=> string(0) ""
["fileName":"SplFileInfo":private]=> string(0) "" }
As you can see, the size is 0, the fileName and the pathName are empty and the mime type is wrong (it should be text/csv). And when I upload a small file (around 100 rows) it works, there is the good size, the pathName/fileName etc.
Do you know if it's a problem with PHP?
FYI, I have these settings in the PHP code:
ini_set('upload_max_filesize', '40M');
ini_set('post_max_size', '40M');
ini_set('max_input_time', 600);
ini_set('max_execution_time', 600);
ini_set('memory_limit', '256M');
set_time_limit(0);
Regards