Error: An error occurred while trying to submit the form (error: Forbidden)
Error: An error occurred while trying to submit the form (error: Forbidden)
Overview: This article describes an error that arises when modifying the User-Server group in Access Control while handling a large volume of data, highlighting the need to adjust certain PHP configuration settings.
This error occurs when you attempt to modify the User-Server group in Access Control while handling a large amount of data.
To fix the error mentioned above, follow these steps:
- Review the application logs by setting the log_level_trace in the ez.conf file.
- Adjust the following values in the php.ini file: Increase max_input_vars, max_execution_time, memory_limit, post_max_size,upload_max_filesize
- Test the scenario in a different browser.
Make sure to modify these values accordingly to resolve the issue.
Step 1: Append the parameter log_level trace in ez.conf
root@gateway:~# echo "log_level trace" | sudo tee -a /usr/local/etc/ezlogin/ez.conf
1.(A): Run the following command to navigate to the log directory:
You can find the same path by checking the system_folder in /usr/local/etc/ezlogin/ez.conf. The path would be /{system folder}/application/logs/. After changing to that directory, you can check the latest log.
root@gateway:~# cd $(awk '/^system_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)/application/logs/
Step 2: Adjust the following values in the php.ini file for apache web server and CLI:
Increase the values for max_input_vars, max_execution_time, memory_limit, post_max_size, and upload_max_filesize in the php.ini file by editing. Refer to the below step.
For Ubuntu 22,
root@gateway:~# php -i | grep -i "max_execution_time\|max_input_vars\|memory_limit\|post_max_size\|upload_max_filesize"
max_execution_time = 300
max_input_vars = 1000
memory_limit = 512M
post_max_size = 512M
upload_max_filesize = 512M
And restart the Apache web service.
root@gateway:~# systemctl restart apache2
Restart the service if you're using the PHP-FPM process by running the following command.(Replace x.x with the installed php version.)
root@gateway:~# systemctl restart phpx.x-fpm
Step 3: Test the same scenario in different browser.
In case you are using CentOS 7, Edit vi /etc/php.ini and follow these commands to check the config file and then restart the web service.
root@gateway :~# httpd -t
root@gateway:~# systemctl restart httpd
To check php.ini file:
root@gateway:~# php -i | grep -i "max_execution_time\|max_input_vars\|memory_limit\|post_max_size\|upload_max_filesize"
Contact support with any error messages you may have.
Related Articles: