Directive upload_max_filesize in php.ini
In the configuration file php.ini with upload_max_filesize directive set the maximum size of uploaded files to the server. If you have access to the php.ini file you can change this value:
upload_max_filesize = 20M
Note that PHP also has a maximum size of POST requests using the directive post_max_size which must be greater than or equal to the maximum size of uploads files:
post_max_size = 20M
Depending on the server configuration, the new values can take effect immediately after making changes, or have to restart the web server.
Modify .htaccess
If you do not have access to the PHP configuration file, you can try to set the values using the file .htaccess to add the following values:
php_value upload_max_filesize 20M php_value post_max_size 20M
Changes to files .htaccess usually take effect immediately after saving.
Use The ini_set() PHP Function
Directives upload_max_filesize and post_max_size can be changed by using the PHP function ini_set() in /config/server.php if allowed by the server configuration:
ini_set( 'upload_max_size' , '20M' ); ini_set( 'post_max_size', '20M');
Other directives which may affect the upload of large files
memory_limit, max_execution_time, max_input_time
Leave A Comment?
You must be logged in to post a comment.