Rectangle 27 0

arrays PHP upload fail (empty $_FILES)?


@ChuckBurgess Its a true fact :)

EDIT: Not sure why the negative vote. While it may not apply exactly in this case, it is worth mentioning. This is exactly what php.net says: http://www.php.net/manual/en/ini.core.php#ini.post-max-size.

If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty.

Negative vote was not mine. Sorry. I'll try what you said when I will have time. For the moment I gave up. Thank you.

The problem is your post_max_size is the same size as upload_max_filesize which will cause the $_FILES array (and $_POST) to be empty. If you up the limit on the post_max_size, the $_FILES array will no longer be empty.

Note
Rectangle 27 0

arrays PHP upload fail (empty $_FILES)?


@ChuckBurgess Its a true fact :)

EDIT: Not sure why the negative vote. While it may not apply exactly in this case, it is worth mentioning. This is exactly what php.net says: http://www.php.net/manual/en/ini.core.php#ini.post-max-size.

If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty.

Negative vote was not mine. Sorry. I'll try what you said when I will have time. For the moment I gave up. Thank you.

The problem is your post_max_size is the same size as upload_max_filesize which will cause the $_FILES array (and $_POST) to be empty. If you up the limit on the post_max_size, the $_FILES array will no longer be empty.

Note
Rectangle 27 0

arrays PHP upload fail (empty $_FILES)?


Check your upload_limit in your php.ini settings.

In your html form tag, do not forget to put this: enctype="multipart/form-data"

Thank you hlegius but I cant find "upload_limit" in my php.ini and seems to not exists : google.fr/. My form works with small files (until approximatively 300Mo), so yes "enctype="multipart/form-data"" is set.

Note