Skip to content

Incorrect opcache.memory_consumption value (returns 0) on PHP 8.5 #2354

@IndraGunawan

Description

@IndraGunawan

What happened?

I am using the standard php.ini from https://github.com/dunglas/symfony-docker/blob/main/frankenphp/conf.d/10-app.ini and seeing an issue where opcache_get_configuration() says ['directives']['opcache.memory_consumption'] is 0, even though it is set to 256MB in my config.

Details
FrankenPHP: PHP 8.4 returns the correct value
FPM: PHP 8.5 returns the correct value
FrankenPHP: with PHP 8.5 returns 0

I noticed a similar issue in php/php-src#16927 (comment). I am opening this here as well because the behavior differs between SAPIs on the same PHP version.

How to reproduce
Set opcache.memory_consumption=256 in php.ini

<?php
var_dump(ini_get('opcache.memory_consumption')); // Shows 256
var_dump(opcache_get_configuration()['directives']['opcache.memory_consumption']); // Shows 0

Build Type

Docker (Debian Trixie)

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

phpinfo() output
-

Relevant log output

Relevant log output
-

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions