Wednesday, 28 September 2022

Maximum uploaded file size

 di bagian:

 di https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize

upload_max_filesize int

The maximum size of an uploaded file.

post_max_size must be larger than this value. 

 

=======================================

 

caranya akses root

nano /etc/nginx/nginx.conf


 

Look for the http section and add the following line (Figure A):

client_max_body_size 100M;

Save and close the file.

Next, open the config file for your website. If you’re using the default, you would open that file with the command:  

nano /etc/nginx/sites-enabled/moodle
 


 

In that file, look for the server section and add the same line as you did in the nginx.conf file (Figure B).


Save and close the file.

Run the NGINX configuration test with the command:

sudo nginx -t

You shouldn’t see any errors. Restart NGINX with the command:

sudo systemctl restart nginx

 

 open the config file php.ini

nano /etc/php/7.4/fpm/php.ini

 memory_limit = 128M
upload_max_filesize = 10M
max_execution_time = 60
post_max_size = 16M

 

Post harus lebih besar daripada upload 


terakhir reboot server

 

 



 

 

 

 

Share:

0 comments:

Post a Comment