Issue Summary:
I am encountering an error when trying to upload media files On my Contacts page. The error message is: Failed to save entry: Failed to move uploaded file.
Environment:
Operating System: Linux
Web Server: Nginx
PHP Version:** 7.4 (FPM)
Grav Root Directory: /var/www/grav/grav-admin
PHP Configuration (php.ini):
file_uploads = On
upload_tmp_dir = /var/www/html
Actions Taken to Resolve the Issue
- Checked Directory Permission
Ensured that theupload_tmp_dirdirectory (/var/www/html) and the target directory for uploads have the correct permissions and are writable by the web server.
2.PHP Configuration:
- Verified the
upload_tmp_dirsetting in thephp.inifile is correct and points to a writable directory (/var/www/html/tmp). - Confirmed that the
file_uploads,upload_max_filesize, andpost_max_sizesettings are correctly configured. - Restarted Services:
- Restarted PHP-FPM and Nginx to apply configuration changes.
- Created a
phpinfo.phpFile: - Verified PHP configuration settings by creating and accessing a
phpinfo.phpfile, confirming the correctupload_tmp_dirand other settings are loaded. -
- Checked Grav Configuration:
- Reviewed and confirmed settings in
system.yamland other relevant configuration files in Grav.
- Reviewed and confirmed settings in
- Debugging Logs:
- Checked Grav and PHP-FPM logs for any related error messages that could provide more context about the issue.
- Checked Grav Configuration:
Additional Information
phpinfo() output related to file uploads:
upload_tmp_dir: /var/www/html/tmpupload_max_filesize: 10Mpost_max_size: 10Mfile_uploads: On
can someone help me resolve issue?








