max_execution_time getting overwritten to 0
-
I’ve been troubleshooting a problem on our site: Query Monitor identified that the
max_execution_time
is being overwritten from the setting in php.ini to a value of 0 (meaning no limit). After a lot of troubleshooting I have found that it is caused by WP All Export.The problematic code was in this plugin file: \wp-all-export\actions\wp_loaded.php
$maxExecutionTime = PMXE_Plugin::getInstance()->getOption('max_execution_time'); if($maxExecutionTime == -1) { $maxExecutionTime = 0; } @ini_set("max_execution_time", $maxExecutionTime);
The default value that is saved to the database (from the options.php file) is a max_execution_time of 0. And on the site I was working on the value in the database had been set to -1. But there is no editable field to adjust this value in WP All Export. This means that the
max_execution_time
is always overridden with 0.What is more, this code is running on every WordPress page load – rather than only running when an export is running. This seems to be a major problem.
I have WP All Export Pro on a different site and the problem does not occur there. It is only in this free version.
Since I’ve got a pro licence I’m just uninstalling the free version and installing the pro version on that site. But I thought you’d want to know about the problem in the free version.
- The topic ‘max_execution_time getting overwritten to 0’ is closed to new replies.