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 helps to resolve an error that occurs while 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 try 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:
1. Review the application logs by setting the log_level_trace in the ez.conf file.
2. Adjust the following values in the php.ini file: Increase max_input_vars, max_execution_time, memory_limit, post_max_size,upload_max_filesize
3. Test the scenario in a different browser.
Step 1: Append the parameter log_level trace in ez.conf to get detailed error log.
root@gateway:~# echo "log_level trace" | sudo tee -a /usr/local/etc/ezlogin/ez.conf
Step 1(A): Run the following command to navigate to the log directory and tail the latest logs:
root@gateway:~# cd $(awk '/^system_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)/application/logs/
root@gateway:/var/www/ezlogin/application/logs# tail -f <the latest log file>
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, check the latest log.
Step 2: Adjust the following values in the php.ini file for apache web server and CLI:
Edit the php.ini file and increase the values for max_input_vars, max_execution_time, memory_limit, post_max_size, and upload_max_filesize.
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
Step 2(A): And restart the Apache web service.
root@gateway:~# systemctl restart apache2
Step 2(B): Restart the service if you are 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.
For CentOS 7 systems, modify the /etc/php.ini file to increase the necessary values. After making the changes, use the following commands to verify the configuration and restart the web server.
root@gateway:~# php -i | grep -i "max_execution_time\|max_input_vars\|memory_limit\|post_max_size\|upload_max_filesize"
root@gateway :~# httpd -t
root@gateway:~# systemctl restart httpd
Step 4: If the error persists contact support with any error messages you may have.
Related Articles: