There are a number of parameters that will likely need to be modified in order to enable larger file uploads for SimpleRisk. These paths and file names are the defaults for Ubuntu other OS may have different file names and paths but the value names will remain the same. You may need to update PHP path based on the version installed on your server.


PHP

You should start by enabling larger file uploads in PHP.  In Ubuntu, the php.ini file is located under /etc/php/8.2/apache2/.  Edit it and change the following values:

  • max_execution_time: The default maximum execution time is 30 seconds.  Depending on the speed of your connection, this may need to be increased.
  • upload_max_filesize: The default maximum upload file size is 5 megabytes.  You should increase this value to the size of the largest file that you plan on uploading into your SimpleRisk instance.
  • post_max_size: The default maximum post size is 8 megabytes.  You should increase this value to around twice the size of the largest file that you plan on uploading into your SimpleRisk instance.
  • memory_limit: The default amount of memory that a script may consume is set to 128M.  You should increase this value to the size of the largest file that you plan on uploading into your SimpleRisk instance.

You will need to restart Apache for these changes to take effect.


MySQL

Next, you should enable larger file uploads in MySQL.  In Ubuntu, the my.cnf file is located under /etc/mysql/mysql.cnf .  Edit it and change the following values:

  • max_allowed_packet: The default maximum allowed packet size is 16MB.  You should increase this value to the size of the largest file that you plan on uploading into your SimpleRisk instance.
  • innodb_log_file_size: The default value is 134217728.  The redo log size needs to be at least 10x bigger than the biggest BLOB/TEXT data that will be inserted in one transaction, thus, you should increase this value to 10x the size of the largest file that you plan on uploading into your SimpleRisk instance.

You will need to restart MySQL for these changes to take effect.


SimpleRisk

You will also need to modify the maximum filesize in the SimpleRisk application.  To do so, go to Configure --> File Upload Settings.  The default value is set to 5,120,000 bytes (5 megabytes).  You should increase this value to the size of the largest file that you plan on uploading into your SimpleRisk instance.