Skip to content

Failed to set opcache.jit #785

Open
Open
@aryanbaghi

Description

@aryanbaghi

I've installed opcache with docker-php-ext-install opcache in docker image based on nginx/unit:1.28.0-php8.1
When I set "opcache.jit": "1235" in config.json, I got this error on container start:

2022/11/09 14:28:57 [info] 79#79 router started
2022/11/09 14:28:57 [info] 79#79 OpenSSL 1.1.1n  15 Mar 2022, 101010ef
2022/11/09 14:28:57 [error] 81#81 setting PHP option "opcache.jit: 1235" failed

By the way when I set this in php.ini file it works.

More info:

Unit Version: 1.28.0
PHP Version: 8.1.10
Run Environment: Docker

config.json:

{
    "listeners": {
        "*:9000": {
            "pass": "routes"
        }
    },

    "routes": [
        {
            "match": {
                "uri": [
                    "*.php",
                    "*.php/*"
                ]
            },

            "action": {
                "pass": "applications/appname/direct"
            }
        },
        {
            "action": {
                "share": "/var/www/html/public/$uri",
                "fallback": {
                    "pass": "applications/appname/index"
                }
            }
        }
    ],

    "applications": {
        "appname": {
            "type": "php",
            "user": "unit",
            "group": "unit",
            "targets": {
                "direct": {
                    "root": "/var/www/html/public/"
                },

                "index": {
                    "root": "/var/www/html/public/",
                    "script": "index.php"
                }
            },
            "options": {

                "user": {
                    ...
                    "opcache.jit": "1235"
                }
            }
        }
    }
}

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