configure_certain_settings_in_php_ini_ubuntu_22_04_nextcloud_27_0

This is an old revision of the document!


Configure Certain Settings in php.ini on Ubuntu Server 22.04 for NextCloud 27.0.0

We need to locate the php.ini file on the Ubuntu Server and then switch to that directory.

:~$ cd /etc/php/8.1/apache2/
:~$ /etc/php/8.1/apache2/$
:~$ /etc/php/8.1/apache2/$ ls
:~$ /etc/php/8.1/apache2/$ php.ini

Edit php.ini using vim or nano.

:~$ vim php.ini 

Within the php.ini file, locate and modify the following settings to read as follows, and enable date.timezone by deleting the leading semicolon ';date.timezone ='

memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
date.timezone = America/New_York

Here is another author's similar list for making changes. For the basic nextcloud deployment, change the default options using the following configuration.

file_uploads = On
allow_url_fopen = On
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 600M 
max_execution_time = 300
display_errors = Off
date.timezone = Europe/Amsterdam
output_buffering = Off

Save and close the php.ini file when you are finished. Then, start the Apache and MySql service and enable them to start after system reboot with the following commands:

sudo systemctl reload apache2
sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql

These commands will run like the following.

:~$ sudo systemctl reload apache2
[sudo] password for user:
        OR
:~$ sudo systemctl start apache2

:~$ sudo systemctl start mysql
:~$ sudo systemctl enable apache2
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2
:~$ sudo systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql
:~$
configure_certain_settings_in_php_ini_ubuntu_22_04_nextcloud_27_0.1687370495.txt.gz · Last modified: 2023/06/21 18:01 by wikiadmin