Bug #73849 [Opn->Nab]: max_execution_time CLI always 0 even php.ini set option to custom value

From: Date: Wed, 11 Jan 2017 05:07:11 +0000
Subject: Bug #73849 [Opn->Nab]: max_execution_time CLI always 0 even php.ini set option to custom value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206491@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73849&edit=1 ID: 73849 Updated by: krakjoe@php.net Reported by: dophini at dir dot bg Summary: max_execution_time CLI always 0 even php.ini set option to custom value -Status: Open +Status: Not a bug Type: Bug Package: PHP options/info functions Operating System: debian jessie PHP Version: 7.0.14 Block user comment: N Private report: N New Comment: As mentioned, the value is hard-coded in CLI to override the default in configuration. Previous Comments: ------------------------------------------------------------------------ [2017-01-05 03:15:10] dophini at dir dot bg why it is so on 7.0 branch? or it will be always 0 in future also? ------------------------------------------------------------------------ [2017-01-04 08:04:59] dingsundbums at gmx dot de Hi *, the max execution time is hardcoded to 0 for the cli. You can set the max_execution_time on the commandline with php -d max_execution_time=5 script.php or in the script: set_time_limit(10); // this way ini_set('max_execution_time', 10); // or this way Greetings, Dierk ------------------------------------------------------------------------ [2017-01-02 04:00:21] dophini at dir dot bg Description: ------------ PHP version: PHP 7.0.14-1~dotdeb+8.1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.14-1~dotdeb+8.1, Copyright (c) 1999-2016, by Zend Technologies Try to set max_execution_time to custom value bigger than 0. php -i gives max_execution-time always 0 Test script: --------------- 1. editing /etc/php/7.0/cli/php.ini 2. setting max_execution_time to 30 seconds 3. php -i | grep max_execution shows max_execution_time =0 4. let's see path to php.ini? php -i | grep php.ini ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73849&edit=1

« previous php.bugs (#206491) next »