PHP options are not changed

Hi all!

I just made a clean install of Virtualmin on a CentOS 8 VPS.

I followed these instructions and installed PHP 7.3 + 7.4 + 8.0

https://www.virtualmin.com/multiplephp/

When I change to PHP 8, and then go to “Manage PHP Configuration”, “Resource Limits”, I change the values and save, but then on the WordPress installation the values won’t change. If I restart PHP service the default values are loaded in the “Resource Limits” option.

So, it seems that the changes I make in “Resource Limits”, or even if I go to “Edit Configuration Manually”, they do not take place. The file is saved, keeps the changes I made, but the WordPress installation on public_html folder won’t be affected…

What am I missing here?

Thanks in advance

SYSTEM INFORMATION
OS type and version: CentOS 8
Webmin version: latest
Virtualmin version: latest
Related products version: RECOMMENDED

If I go to

etc/php.ini

I can see that the values I set to

upload_max_filesize = 32M

post_max_size = 32M

max_execution_time = 300

are correct.

I installed a PHP server info plugin on Wordpress and it says

Max Execution Time: 30

Upload Max Filesize: 2M

So why isn’t the public_html taking in account the etc/php.ini file? Or does PHP 8 have another php.ini file in another location?

My first question would be why are you running 3 versions of php?

My second question would be why are you running php8. I can think of absolutely nobody running it right now as far as any service provider. What’s more, everybody I’ve seen come here lately with php8 has had nothing but problems.

You do not need a php plugin for Wordpress. It’s a complete waste of time and resources.

Go to the server you’re running the Wordpress site on in Virtualmin and see which version of php you have it running. I’m willing to bet that you have a different version running on it than you set the values for.

Example: Lets say your hosting WP on myvminserver. Go to myvminserver and click on the Server Configuration / PHP Options tab. When that opens you should see your settings for what is presently running. But if you set the values on the php 8 and you’re running php 7.4 you’ll need to set them on that version as well. There is a dropdown tab where you can select each version and set the same values for all of them so that no matter which version you’re running you’ll have the same settings.

I’m thinking that’s what has happened; you set the values manually on a php.ini for a different version than the php version that particular virtual server is running.

Wordpress installs it’s own php.ini file. You will find it in /home/username/etc . It’s probably a symbolic link so you will have to edit the file and make your changes there. I found out this the hard way as well.

It depends on execution method (php-fpm, fcgid, etc.) where the php.ini directives end up. I don’t know off-hand where they are, but it’s not as simple as I wish it were…there are literally as many possible locations as there are available execution modes.

3 versions or even more of PHP is common for example:
DEV boxes.
Migration Boxes.

If you are in Migration traject for more virt Servers / sites it makes sens if Versions of programms/ apps used or addon needed old / older version only to work.

Then if newer version support newer php version and you do migrations on same box you have then a minimum of 2 php versions.

The php8 is good to have if you want to know your apps are supporting that version, but a must to have for developers that are working on those apss to migrate them to have PHP 8 support.

Also if you use only the newest APPS with already good php8 support then why use older version of php? If developing them then ofcourse you do it for php8 support yes…?

And Yes it is hard to find out what where the config settngs are in real with more versions and modes, i can’t remember those also, always have to check with phpinfo file in that public folder for that site if it worked while some apps have own user.ini or other php configuration files to

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