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

From: Date: Tue, 02 Jun 2020 12:20:38 +0000
Subject: Bug #79665 [NEW]: ini_get() and opcache_get_configuration() may be inconsistent
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227273@lists.php.net to get a copy of this message
From:             cmb
Operating system: *
PHP version:      7.3Git-2020-06-02 (Git)
Package:          opcache
Bug Type:         Bug
Bug description:ini_get() and opcache_get_configuration() may be inconsistent

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 bug report at https://bugs.php.net/bug.php?id=79665&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79665&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79665&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79665&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79665&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79665&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79665&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79665&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79665&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79665&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79665&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79665&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79665&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79665&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79665&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79665&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79665&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79665&r=mysqlcfg


Thread (3 messages)

« previous php.bugs (#227273) next »