如何在opcache中启用优化(在官方的php-fpm docker镜像中)

The container is built from a trivial Dockerfile:

FROM php:7.2.19-fpm

RUN docker-php-ext-configure opcache --enable-opcache \
    && docker-php-ext-install opcache

I did not change php.ini, so all the settings are default.

What's unexpected is that now phpinfo shows (the excerpt):

Opcode Caching  Up and Running
Optimization    Disabled
SHM Cache   Enabled
File Cache  Disabled

opcache.enable  On  On
opcache.optimization_level  0   0x7FFFBFFF

The question: what else do I need to do to have optimisations enabled?

php
dougu1045
dougu1045 不,php不需要php.ini来运行
大约一年之前 回复
doucuan5365
doucuan5365 据我所知,您必须通过.ini自行添加(复制)设置
大约一年之前 回复

1个回答



嗯,道歉,我把这个问题过分简化到一个无法回答它的程度。 我真的很抱歉。</ p>

它未启用的真正原因是因为xdebug已经安装并启用了。</ p>
</ div>

展开原文

原文

Well, my apologies, I over-simplified the question to a degree when it's impossible to answer it. I'm really sorry for that.

The real reason it's not enabled is because xdebug is installed and enabled as well.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐