Now that Apache2 and PHP are installed, you may want to configure PHP so that you can use it according to what suits your PHP apps. The default PHP configuration file is located at /etc/php/7.4/apache2/php.ini, so follow these steps to configure your version of PHP 7.4:
- Run the following command to edit or configure PHP 7.4:
$ sudo nano /etc/php/7.4/apache2/php.ini
You may need to change the default allowance of upload_max_filesize for uploaded files:
upload_max_filesize = 2M
You can find more information about this configuration at http://php.net/upload-max-filesize.
2 MB maximum for uploaded files can be considered small for PHP apps. So, go ahead and change it to suit your needs, as follows:
upload_max_filesize = 32M
The following are some other important lines/PHP directives to consider:
post_max_size = 48M
memory_limit = 256M
max_execution_time = 600
You can find more information about the preceding PHP directives and other directives for&...