0

In Ubuntu 16.04 with Nginx (LEMP) I created the file /etc/php/7.0/fpm/zz_overrides.ini.

The file contains only this code:

[PHP]
post_max_size = 2000M
upload_max_filesize = 2000M
max_execution_time = 3000
cgi.fix_pathinfo=0

After creating the file I saved it and restarted Nginx and PHP-FPM:

systemctl restart nginx.service
/etc/init.d/php*-fpm restart

And yet, I don't see the effect. For example, I can still upload data up until 2 megabytes instead 2000 megabytes, see:

enter image description here


My question

Why is the zz_overrides.ini file isn't effective?

Osi
  • 1
  • 3
  • 9
  • 30

2 Answers2

1

Create a php file with the following content:

<?php
phpinfo();
?>

There you can see all current settings.
In the first section you have "Additional .ini files parsed".
So you can see which files are loaded. Also "Scan this dir for additional .ini files" shows you which additional folders are scanned for config files.

Eydamos
  • 562
  • 4
  • 16
0

What I had to do is to enable my additional php.ini file

I did so by creating a softlink (symlink) to it, in conf.d directory:

ln -s /etc/php/7.0/fpm/zz_overrides.ini 20-zz-overrides.ini

Then indeed I saw the desired change:

enter image description here


Version-agnostic variant

A version-agnostic (version independent) variant of this command is this:

ln -s /etc/php/*/fpm/zz_overrides.ini 20-zz-overrides.ini
Osi
  • 1
  • 3
  • 9
  • 30