Hack Forums
[PHP] upload_max_filesize doesn't change !? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183)
+---- Thread: [PHP] upload_max_filesize doesn't change !? (/showthread.php?tid=5006682)



upload_max_filesize doesn't change !? - RayGenWurm - Oct 1, 2015

Hey there,

I am near to rage out -.-

I am running a Webserver at my home on a bananapi running raspbian.
now i need to allow bigger files to upload on my server.

in /etc/php5/apache2/php.ini
i changed following things:
PHP Code

<?php 
upload_max_filesize 
= 20M
post_max_size 
= 20M
memory_limit 
= 512M 

now when i take a look at phpinfo(); only memory_limit changes.. the other two just ignore everything i type in...

of course i restarted apache..

anybody some ideas what could be the problem?



--------- EDIT


Okay a freind found a solution.. if anyone ever has the same problem.

i just had to create a file calles "user.ini" at /etc/php5/apache2/conf.d
with this content:
PHP Code

<?php 
upload_max_filesize 
= 20M
post_max_size 
= 20M 



* - MineSQL - Oct 1, 2015

I'm sure if you look in your php.ini there is somewhere further in the file that redefines the upload limit size, if you care or want to know why it's doing this. Because the extra file is being loaded after that second upload limit is set it overwrites it.


* - c00perzz - Oct 2, 2015

you can also change it via .htaccess

php_value post_max_size 20M
php_value upload_max_filesize 20M
php_value memory_limit 512M


* - The Slayer - Oct 2, 2015

Are you 100% sure its the right php.ini? use phpinfo() to confirm and see if the settings are active!