Skip to content

PHP checks the filesystem for file existing even if available in opcache and all opcache validations are disabled #13989

@dkarlovi

Description

@dkarlovi

Description

The following code:

opcache.enable = 1
opcache.enable_cli = 1

opcache.file_update_protection = 0
opcache.validate_timestamps = 0
opcache.validate_permission = 0
opcache.validate_root = 0

opcache.file_cache = "/var/cache/opcache"
opcache.file_cache_only = 1
opcache.file_cache_consistency_checks = 0

will still trigger "File doesn't exist" even though opcache is correctly prepopulated. If I create an empty folder with an empty file, it works as expected.

See (reproduced in Docker, but this is not Docker specific, it's only convenient to reproduce there):
https://github.com/dkarlovi/docker-php-opcache-only/blob/main/Dockerfile#L15

Try it like here:
https://github.com/dkarlovi/docker-php-opcache-only/blob/main/README.md

PHP Version

PHP 8.2, 8.3

Operating System

Docker PHP image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions