Reloading nginx & php5-fpm does not update changes

2019-01-20 07:58发布

问题:

I've made changes to max_upload_size in /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?

回答1:

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.

https://serverfault.com/questions/189940/how-do-you-restart-php-fpm/506951

Try those and see if they reload it.



回答2:

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

Where memory_limit is the value you are wanting to edit on your php.ini and 10M... I think you get the picture!



标签: nginx php