php 7 php.ini upload_max_filesize not working
I had a fix for PHP-FPM 7.1
Edit your php.ini in
/etc/php/7.1/fpm/php.ini
Make changes to whatever option you want like, post_max_size, upload_max_filesize, max_execution_time & so...
save & close file.
run
sudo service php7.1-fpm restart
It will work!
i fingured out !
in my loaded php.ini
config , my error_reporting
values is E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
-> this is wrong!, so i changed it to
error_reporting: E_ALL
and then restart apache2 server,
now everything working fine !
so please note : if php.ini
have any error , it will use default value (which means upload_max_filesize
always 2M
)
I had an other fix for it. os: ubuntu 16.04 phpversion: 7.0
I created a phpinfo.php file containing:
<?php phpinfo() ?>
place the phpinfo.php file in the root of your website www.mywebsite.com/phpinfo.php
Navigating to it and lookup the line:
Loaded Configuration File : /etc/php/7.0/cgi/php.ini
Now you know what php.ini file is loaded.
ssh into the server and use your favorite editing tool (mine is nano) to adjust the php.ini
change the values to meet your preferences.
post_max_size = 128M
upload_max_filesize = 64M
Save and close the file.
Restart apache
sudo service apache2 restart
__
check the phpinfo.ini if the new values are as set.
and if they do you are set to go.