Hi there,
When running CLI PHP scripts, such as the Symfony console binary, the execution time appears to be clamped at 300 seconds. Calling
The cPanel account in question is configured to use FPM for PHP via HTTP, which has a 600 second execution limit working fine, but that doesn't apply to CLI execution. Scripts via HTTP can also change their execution time limit as expected.
PHP is installed via EasyApache 4. We're using version 7.2 for this account due to reasons.
Calling
Where can we adjust this?
File
Thanks.
When running CLI PHP scripts, such as the Symfony console binary, the execution time appears to be clamped at 300 seconds. Calling
set_time_limit()
, ini_set("max_execution_time")
, or using the -d
CLI option to override "max_execution_time" all make no difference. (Both increasing and decreasing.)The cPanel account in question is configured to use FPM for PHP via HTTP, which has a 600 second execution limit working fine, but that doesn't apply to CLI execution. Scripts via HTTP can also change their execution time limit as expected.
PHP is installed via EasyApache 4. We're using version 7.2 for this account due to reasons.
Code:
$ which php-cli
alias php-cli='/opt/cpanel/ea-php72/root/usr/bin/php'
/opt/cpanel/ea-php72/root/usr/bin/php
$ php-cli -v
PHP 7.2.32 (cli) (built: Jul 29 2020 17:34:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.32, Copyright (c) 1999-2018, by Zend Technologies
$ php-cli -i | grep max_execution_time
max_execution_time => 0 => 0
echo ini_get("max_execution_time");
within the same CLI script shows the intended figure, but it still closes prematurely at the standard 300 second limit.Where can we adjust this?
File
/opt/cpanel/ea-php72/root/etc/php.ini
specifies 600 seconds, though this seems to apply to just FPM.Thanks.
Last edited: