Changes to php.ini in Webmin not reflected on individual sites

SYSTEM INFORMATION
OS type and version Debian Linux 12
Virtualmin version 7.30.8 Pro

I am attempting to set some variables for PHP globally across all sites on my server.

Under Webmin => Tools = > PHP Configuration, I am editing /etc/php/8.3/cgi/php.ini

I click on Manage, then Resource Limits, and set the values I want:

But when I check an application (within Joomla), or phpinfo from a server / site, the resource settings do not match:

Am I missing something, that would cause the values to be ignored or overridden?

OK, it looks like if I modify the settings for that server / domain, it updates correctly. My question now becomes - why is it not respecting the global values set in Webmin?

That’s not “global”. Each domain gets its own PHP configuration when it is created.

Then maybe use the template settings?

Server Templates are supposed to apply at domain creation time, and changes made to Server Templates now won’t alter domains created in the past.

You can make bulk changes to some PHP Options in Virtualmin Pro by going to List Virtual Servers-> and click “Update Selected”, then choose PHP Options. But, that doesn’t include resource limits.

I don’t think there is a bulk way to update these options in the GUI.

1 Like

Got it, so it sounds like I need to set the template options before I create the servers - I was in a rush to get all my servers back online, and missed this during deployment.

It would be good if there was a way to bulk update options - I’ll open a feature request for this for down the line.

I believe it can be done via the CLI, though.

1 Like

That did the trick, thank you. In my case, the commands I needed were:

virtualmin modify-php-ini --all-domains --ini-name post_max_size --ini-value 16M

virtualmin modify-php-ini --all-domains --ini-name upload_max_filesize --ini-value 16M

virtualmin modify-php-ini --all-domains --ini-name output_buffering --ini-value off
4 Likes

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