1. Nginx configuration modification
1. Modify the Nginx.conf (/ etc/Nginx/Nginx.conf) configuration file, and add or modify the following configuration in http{}:
client_max_body_size 20m;
2. Restart nginx
systemctl restart nginx
2. PHP configuration modification
Find the location of the php.ini file:
Method 1
Use the command whereis php; to view the php related directories, if you can't find the ini file in the listed directories, you can refer to method 2.
Method 2
php --info > a.log;
vim a.log, To view the output, you can directly search for php.ini and you will see the directory where the file is located. As the following screenshot.
1. Modify the php.ini (/etc/PHP.ini) configuration file, find the following configuration and modify it:
post_max_size = 20M
upload_max_filesize = 20M
2. Restart PHP FPM
systemctl restart php-fpm
Read More:
- [PHP] Solve the limitation of uploading files in nginx php 413 Request Entity Too Large
- [Solved] Laravel Upload Files Verificate Error: The file failed to upload.
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- PHP: How to parse MHT file into HTML
- /www/server/php/56/sbin/php-fpm:error while loading shared libraries:libssl.so.1.0. 0:cannot open shared object file:No such file or directory
- [Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto
- PHP file download, download failed, nginx open() nginx / fastcgi_ temp/2/10/0000000102“ failed (13: Permission denied)
- Mac installs the php Swoole extension and appears Enable openssl support, require openssl library or fatal error:’openssl/ssl.h’ file not found
- PHP error in Windows: class’ mysqli ‘not found
- nginx.conf php-fpm.conf and php.ini Error among the three_ Differences and relations between log instructions
- How to Hide index.php
- PHP php-config is not installed error in ubuntu 16 [How to Solve]
- Mac: Where is php.ini Location
- [Solved] PHP -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory
- [Solved] PHP Fatal error: Uncaught Error: Class ‘Redis‘ not found in
- Mac PHP Fatal error: Class ‘Memcache’ not found
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- PHP solves the problem that composer exceeds the memory size Allowed memory size
- [Solved] PHP installation Phalcon expansion error
- composer Error: The requested PHP extension ext-bcmath * is missing from your system. Install or enable