The size limitation is imposed by your PHP configuration also; therefore you need to update php.ini
and update two settings post_max_size
and upload_max_filesize
.
The php.ini
is not found on codeigniter, rather the PHP installation on your server. Read more about it here: http://php.net/manual/en/configuration.file.php
Say you want to allow a max upload file size of 256mb, this is what you should have on the php.ini
:
post_max_size=256M
upload_max_filesize=256M
Once you made the change to php.ini
, you have to restart the apache or php-fpm - depending on what you are using.
If you are on a shared hosting environment, you may not get direct access to the php.ini
file, but your hosting provider may give you limited access to modify php configuration via their hosting control panel such as cPanel or Plesk etc...
If you developing locally, and say you are on windows using XAMPP for example; the php.ini
file is usually found here: C:\xampp\php\php.ini
(depends on where you've installed xampp). On linux, the php.ini configuration tends to be somewhere like /etc/php.ini
(not always guranteed).
You could always create a file on your server called phpinfo.php
with this script: <?php phpinfo(); ?>
and visit it, e.g. http://localhost/phpinfo.php and it will show you the location the loaded php.ini
file as well as the current setting values of post_max_size
and upload_max_filesize
.