Bug #79665 [PATCH]: ini_get() and opcache_get_configuration() may be inconsistent

From: Date: Tue, 02 Jun 2020 13:04:23 +0000
Subject: Bug #79665 [PATCH]: ini_get() and opcache_get_configuration() may be inconsistent
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227275@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79665&edit=1 ID: 79665 Patch added by: cmb@php.net Reported by: cmb@php.net Summary: ini_get() and opcache_get_configuration() may be inconsistent Status: Open Type: Bug Package: opcache Operating System: * PHP Version: 7.3Git-2020-06-02 (Git) Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Fix #79665: ini_get() and opcache_get_configuration() inconsistency On GitHub: https://github.com/php/php-src/pull/5656 Patch: https://github.com/php/php-src/pull/5656.patch Previous Comments: ------------------------------------------------------------------------ [2020-06-02 12:21:40] cmb@php.net Related To: Bug #79644 ------------------------------------------------------------------------ [2020-06-02 12:20:37] cmb@php.net Description: ------------ For some INI settings OPcache adjusts the given values if they are not permissible. However, despite some (futile) efforts in the code, the originally passed values are reported by ini_get() and phpinfo(), while opcache_get_configuration() reports the adjusted values. This is at least very confusing. The affected INI settings are: * opcache.max_wasted_percentage * opcache.memory_consumption * opcache.max_accelerated_files Test script: --------------- <?php var_dump( ini_get('opcache.max_accelerated_files'), opcache_get_configuration()['directives']['opcache.max_accelerated_files'] ); ?> Expected result: ---------------- bool(true) Actual result: -------------- bool(false) when run with opcache.max_accelerated_files=10 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79665&edit=1

« previous php.bugs (#227275) next »