Usually all servers have a default limit of 2 Mb for downloading files via the web.
To increase the limit you need to create php.ini file in /public_html/ folder and write the following lines in the file:
- upload_max_filesize = 8M # Sets the maximum file size you can upload to the server.
- post_max_size = 8M # Sets the maximum amount of data which can be transferred via POST.
- memory_limit = 32M # Sets the maximum amount of memory that can be used by a php script.
These parameters allow you to upload files up to 8 Mb but if you need more you can specify other values, e.g. 16M
the memory_limit variable must be larger than post_max_size
Note: the own php.ini file is only valid within the directory in which it is placed unless you specify a special option in .htaccess, see below.
To make your values work for the whole account and all scripts then add lines described below at the beginning of .htaccess file located in /public_html/ if it does not exist, then create it
suPHP_ConfigPath /home/user/public_html <Files php.ini> order allow,deny deny from all </Files>
Warning! : /home/user/... - instead of user you need to write your user name CPanel
To see the selected PHP display, current configuration and version create a text document info.php and place it in the public_html folder.
Open this document and type:
<?php phpinfo(); ?>
Save the file.
Open the browser and type in the address bar:
Press Enter and you will see all the PHP settings for your account. Find for example the value memory_limit and see the value.