Turns out it was caused by the temporary directory PHP uses for uploads. By default this is C:\Windows\Temp, which is not writable for PHP.
In php.ini, add:
upload_tmp_dir = C:\inetpub\temp
Make sure to remove any other upload_tmp_dir
settings. Set permissions on C:\inetpub\temp
so IUSR
and IIS_IUSRS
have write permission. Restart IIS and you should be fine.
Similar case: https://stackoverflow.com/a/15568928/20058276.
Update
One of the possible reasons is file name was not specified or was invalid. Since you tried different database files. This reason can be ruled out.
Then the temporary directory for uploading files is not writable by PHP. Like I mentioned above.
Finally, there is the file size exceeded the upload limit of PHP or phpMyAdmin. PHP is setup to allow 100MB. Please show the relevant code in php.ini. Because post_max_size
upload_max_filesize
max_execution_time
max_input_time
and memory_limit
all need to be set. And the service must be restarted after setting.
Or upload large size database using MySQL Console: https://stackoverflow.com/a/22343190/20058276
So you need to test separately to find the real cause. Feel free to share if you have any doubts. Community members will be happy to help you.