How to Fix SuiteCRM 8.x Upload File Size Error?

I recently had an issue with SuiteCRM installation due to an error with the “Upload File Size”. I didn’t receive any error message on the web interface, so I tried to install it through the command line interface (CLI), but I got an error message as shown in the image provided. I edited the php.ini file and restarted Apache multiple times, but it didn’t solve the issue.

The solution was to edit all the php.ini files, not just the one used by Apache 2. In my case, I edited the /etc/php/8.1/cli/php.ini file for command-line PHP, and the /etc/php/8.1/apache2/php.ini file for PHP running as an Apache module.
This fixed the problem for me.