CodeIgniter Forums
Change limitation upload file size - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: Change limitation upload file size (/showthread.php?tid=77670)



Change limitation upload file size - eellookkeeaa - 10-01-2020

Hello, I have a question.

Where should I put my php.ini on CodeIgniter4?
I've tried on the folder: public

Here is my code:

Code:
memory_limit = 32M
upload_max_filesize = 24M
post_max_size = 32M
I also tried this on my .htaccess (in public).

But none of them work


RE: Change limitation upload file size - InsiteFX - 10-01-2020

There is a php.ini in the php folder that's where those are found.

The sizes should all match, outside of menory_limit.


RE: Change limitation upload file size - John_Betong - 10-01-2020

Some PHP settings can be dynamically changed using ini_set("..., "...");

https://www.php.net/manual/en/ini.list.php

Settings can be viewed using ini_get(...);

Beware when updating the system that php.ini vales are reset to their defaults.

From the command line to find where the PHP.ini is located and PHP version:

php --ini

php -v

And phpinfo.php for more information.


RE: Change limitation upload file size - eellookkeeaa - 10-03-2020

Hello, I had to modify my PHP config (on my VPS) to unblock the limit. Because via htaccess, or php.ini, or even ini_set(), it was never working.


RE: Change limitation upload file size - John_Betong - 10-03-2020

Try the following search:

https://www.google.com/search?q=why+cannot+set+upload_max_filesize+inin_set&rlz=1C9BKJA_enTH762TH762&oq=why+cannot+set+upload_max_filesize+inin_set&aqs=chrome..69i57.39292j0j7&hl=en-GB&sourceid=chrome-mobile&ie=UTF-8