php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79665 ini_get() and opcache_get_configuration() may be inconsistent
Submitted: 2020-06-02 12:20 UTC Modified: 2020-06-02 13:04 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: opcache
PHP Version: 7.3Git-2020-06-02 (Git) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [2020-06-02 12:20 UTC] 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


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-02 13:04 UTC] cmb@php.net
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
 [2020-06-02 13:04 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-06-03 09:07 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d23cd354c04651f740b1ddc8e040a4a33c586d8a
Log: Fix #79665: ini_get() and opcache_get_configuration() inconsistency
 [2020-06-03 09:07 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC