$HOME/etc/php.ini vs /etc/php/8.1/fpm/pool.d/nnnnnnnnnnnn.conf?

SYSTEM INFORMATION
OS type and version Ubuntu 22.04 LTS
Webmin version 2.101
Virtualmin version 7.8.2 Pro
Related packages Script version of WordPress

I’m a little confused on php.ini settings and how they get set and propagated.

I’m trying to change upload_max_filesize from 10M to something bigger for a wordpress migration.

I tried editing $HOME/etc/php.ini but there is no effect. It seems that the value in /etc/php/8.1/fpm/pool.d/nnnnnnnnnnnnnnnn.conf (where nnnnn is the id number of the domain) is the value that’s used.

169473227410385.conf:php_value[upload_max_filesize] = 10M

Who set that, and is it ok to manually change it? Will it get stomped on? Why doesn’t php.ini settings work?

Guess: The wordpress.pl install script set it, it’s a one time thing. I can remove those lines from the pool.d value and the php.ini value will start taking effect?

Thanks!
-m

Create a file in your webserver root named phpinfo.php with the following content:

<?php phpinfo() ?>

Load the file in your browser and you will see the path to the configuration file, where there is the php.ini file located. Delete it after you’ll find this information.

When you change the values you must reload/restart your webserver.

Thanks for the suggestion, but the setting is coming from the /etc/php/fpm/pool.d/*.conf file. phpinfo() does not show the use of that file, or the one in $HOME/etc (which I assume does nothing in the FPM context???). It shows /etc/php/8.1/fpm/php.ini and /etc/php/8.1/fpm/conf.d/*.ini only. None of these files has the setting that’s being used (upload_max_filesize= 10M).

The question still stands : in a virtualmin context, what’s the best way to set php.info settings on a per-site basis when using php-8.1-fpm ? And what populates the /etc/php/fpm/pool.d/*.conf files?

Thanks,
-m

aha, I’ve found it.

Virtualmin → Choose Virtual Server → Services → PHP-FPM Configuration → Resource Limits.

I didn’t see this additional PHP setting place.

1 Like

No need to do that, its already available.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.