I’ve made changes to
/etc/php5/fpm/php.ini and restarted both nginx and php5-fpm services.
phpinfo() states that
/etc/php5/fpm/php.ini is being loaded but after reloading/restartinb both services,
max_upload_size remains unchanged.
Question: A server reboot solved the problem. Why is a reboot required? Did I miss out anything when restarting the services?
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
The issue is probably that you never actually restarted php-fpm. I had issues with this as well, apparently theres a bunch of different ways to restart php-fpm, and some of them dont work for certain environments.
Try those and see if they reload it.
I know there is already an answer to this but I also have had a similar problem to this one and Galen‘s answer did not help with me.
My answer is to instead of editing
/etc/php5/fpm/php.ini, edit your
/etc/php5/fpm/php-fpm.conf file and add to the end something like this:
php_admin_value[memory_limit] = 10M
memory_limit is the value you are wanting to edit on your
10M… I think you get the picture!
CentOS 7, PHP 5.6, nginx 1.12 use
systemctl reload php-fpm
sudo service php-fpm reload
You get errors like:
php-fpm: unrecognized service
(Although you see it like this when doing
ps aux | grep php)
sudo service --status-all | grep -i fpm
to see the real names of services.
sudo service php7.3-fpm reload
to reread php.ini
nginx is in use. whoever in rush editing
php.ini like me this might be the correct paths to edit
then to take effect
service php7.4-fpm restart service nginx restart
also this one could help to see what process is running and where php.ini is
ps aux | grep php php -i | grep php.ini
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂