Created
July 9, 2019 01:28
-
-
Save enqtran/91116241bd648ccd835246ad8c27d9ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- The default will restrict you to a max 2 MB upload file size. | |
- upload_max_filesize – The maximum size of an uploaded file. | |
- memory_limit – This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written - scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1. | |
post_max_size – Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. | |
--------------------------------------- | |
- There are two methods two fix this problem. | |
* 1: Edit php.ini | |
Edit your php.ini file (usually stored in /etc/php.ini or /etc/php.d/cgi/php.ini or /usr/local/etc/php.ini): | |
memory_limit = 32M | |
upload_max_filesize = 10M | |
post_max_size = 20M | |
# service httpd restart | |
OR | |
# service lighttpd restart | |
2: Edit .htaccess | |
Edit .htaccess file in your root directory. | |
php_value upload_max_filesize 10M | |
php_value post_max_size 20M | |
php_value memory_limit 32M | |
--------------------------------------- | |
# /etc/php.d/suhosin.ini | |
suhosin.memory_limit=32M | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment