PHP settings bug (max_execution_time) in CLI - WordPress

**Operating system: CentOS Linux **
OS version: 8.3.2011

After updating Virtualmin to the current version, the max_execution_time setting (set to 900 seconds) is not implemented by wordpress. Any value I set in Virtualmin> Services> PHP 7.4 Configuration and in Webmin> Tools> PHP Configuration> Change PHP Configuration>

it is not accepted by Wordpress. On a wordpress site it shows me a value = 0 while I set a value of 900 (which I also see in the manual configuration of Virtualmin / Webmin).

Is this a Virtualmin bug? How to solve the problem?



What Virtualmin version is the latest for you?

The easiest solution is to create a small PHP file under virtual server (your domain) and call for phpinfo() function in that file, to see if you’re changing the right configs and running expected PHP version, and in expected mode.

If you manually editing those configs, related services would need a restart.

Thank you for your answer.
Version Webmin 1.973
Version Usermin 1.823

Using phpinfo () I found that the PHP version is the right one, 7.4.16, the max_execution_time parameter is the right one I set (900).

The strange thing is that inside wordpress I keep seeing the value max_execution_time = 0.

What can it depend on?
It happens to me on two virtual servers.

I am running OBS-studio on the server, could there be a conflict? OBS-studio is installed as a snap, so I don’t think it interferes with php.

Thanks again.

Notice this caveat for max_execution_time = in our php.ini files:

; Note: This directive is hardcoded to 0 for the CLI SAPI

I’m wondering if Wordpress is referring to scripts exectuted by the PHP CLI. i.e., It could be that you’re actually good to go and nothing is wrong (according to your phpinfo page).

I think you are right. On the machine I have PHP CLI installed. But why does wordpress tell me the max_execution_time value of the CLI installation?

If you have a htaccess file make sure you don’t have a lower value set in it. That’s typically what happens is the htaccess file overrides the setting you dictate in php.ini.

I’ve even seen some people (for whatever reason) set php limits in their config.php Wordpress file. Check that too and make sure that isn’t what is going on.

I don’t know enough about Wordpress to go deep, but it surely has scripts under the hood that don’t use the web server and only need the CLI.

PHP CLI may not be your issue but… food for thought.

Thank you for your suggestion. I use Nginx, not Apache and therefore I don’t have an htaccess file. Inside the config.php file I have not set the max_execution_time parameter. The value = 0 that I see in wordpress is reported to me by the DIVI theme and by an image processing plugin.

Then the only other thing I can think of is that you didn’t restart nginx after you changed your php.ini.

Anyone have any idea how to fix this?

Thank you

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