It looks like you've configured both PHP and Nginx to accept file uploads of up to 100M, which is good. However, the error you're seeing (-error: 1) in the UploadedFile object indicates that the upload exceeded the upload_max_filesize directive in php.ini. This is a bit confusing since you've mentioned that the MP4 file is only 17M.
Here are a few steps to troubleshoot the issue:
-
Double-check your
php.inisettings. Make sure you have setupload_max_filesizecorrectly (it should beupload_max_filesizeinstead ofupload_max_file_size). Also, ensure that you have restarted your PHP-FPM service after making changes tophp.ini. -
Verify that you are editing the correct
php.inifile. You can create a PHP file with the following content to check your configuration:
<?php
phpinfo();
Access this file through your web server to see the loaded configuration and verify the upload_max_filesize and post_max_size values.
-
Ensure that you have reloaded or restarted Nginx after adding the
client_max_body_sizedirective to your Nginx configuration. -
Check your Nginx error logs for any messages that could indicate why the file upload is failing. The error log path is usually defined in your Nginx configuration file (
error_logdirective). -
If you're using PHP-FPM, check the PHP-FPM error logs as well. There might be additional information there.
-
Make sure that the
tmpdirectory used by PHP for uploads (upload_tmp_dirinphp.ini) is writable by the PHP process. -
If you're using a web application framework like Laravel, make sure that the framework's configuration isn't imposing its own file size limits.
If after checking all these steps the problem persists, you might want to provide more information about your environment, such as the specific versions of PHP and Nginx you're using, and any additional server configuration that might be affecting file uploads.