Php7.1-Fpm Php. Ini Not Changing at All

Php7.1-Fpm Php. Ini Not Changing at All

When I code this in my php file:

echo php_ini_loaded_file();

The output is : /etc/php/7.1/fpm/php.ini

Then I edit the php.ini

sudo nano /etc/php/7.1/fpm/php.ini

And change my memory_limit to 256M, upload_max_filesize from 2M to 10M, post_max_filesize from 8M to 10M,

then I exit and I run

sudo service php7.1-fpm restart
sudo /etc/init.d/php7.1-fpm restart
sudo service nginx restart
sudo /etc/init.d/nginx restart

Then I see my phpinfo(), my memory limit, upload max filesize and post max filesize not changing at all..

I turned off my computer then I turn on it again, and check my phpinfo(), it's still not changing..

May I know what should I do to change them, please?

1 Answer

You must configure nginx to forward the requests to the PHP FastCGI processor (php-fpm). An example configuration can be found at Nginx PHP-FPM

After configuring, restart both services to take effect.

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.