php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78291 opcache_get_configuration doesn't list all directives
Submitted: 2019-07-14 14:02 UTC Modified: -
From: andy at amnuts dot com Assigned:
Status: Closed Package: opcache
PHP Version: 7.2.20 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andy at amnuts dot com
New email:
PHP Version: OS:

 

 [2019-07-14 14:02 UTC] andy at amnuts dot com
Description:
------------
New opcache directives have been added recently which are returned if using `ini_get_all('zend opcache')` but are not listed in the directives if using `opcache_get_configuration()`.

Test script:
---------------
<?php

$opts = opcache_get_configuration()['directives'];
$inis = ini_get_all('zend opcache');

var_dump(array_diff_key($inis, $opts));

?>

Expected result:
----------------
array(0) {
}


Actual result:
--------------
array(4) {
  ["opcache.file_update_protection"]=>
  array(3) {
    ["global_value"]=>
    string(1) "2"
    ["local_value"]=>
    string(1) "2"
    ["access"]=>
    int(7)
  }
  ["opcache.huge_code_pages"]=>
  array(3) {
    ["global_value"]=>
    string(1) "0"
    ["local_value"]=>
    string(1) "0"
    ["access"]=>
    int(4)
  }
  ["opcache.opt_debug_level"]=>
  array(3) {
    ["global_value"]=>
    string(1) "0"
    ["local_value"]=>
    string(1) "0"
    ["access"]=>
    int(4)
  }
  ["opcache.restrict_api"]=>
  array(3) {
    ["global_value"]=>
    string(0) ""
    ["local_value"]=>
    string(0) ""
    ["access"]=>
    int(4)
  }
}


Patches

directives.patch (last revision 2019-07-14 14:02 UTC by andy at amnuts dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-14 14:05 UTC] andy at amnuts dot com
The following pull request has been associated:

Patch Name: Fixes #78291 (missing opcache directives)
On GitHub:  https://github.com/php/php-src/pull/4402
Patch:      https://github.com/php/php-src/pull/4402.patch
 [2019-07-15 08:33 UTC] nikic@php.net
Automatic comment on behalf of andy@amnuts.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=768ad70f70a1bebed38e2b06a7515e3c61482f75
Log: Fix bug #78291 Missing opcache directives
 [2019-07-15 08:33 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC