dsilhx5830 2019-07-28 23:19
浏览 491

如何在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?

  • 写回答

1条回答 默认 最新

  • duanfangbunao36970 2019-07-28 23:32

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 关于#wireshark#的问题:并且能够给数据做标注,如这个流量是在看视频或者是在转账
  • ¥90 请问,这个视频播放软件的名称,用过的朋友请给答案,上方..avi是啥意思?是看短剧还是播放本地视频?
  • ¥15 运筹优化,gurobi,python
  • ¥15 基于python的电影系统推荐
  • ¥20 springmvc重定向和返回json
  • ¥15 数学建模——参会安排怎么做
  • ¥15 电脑键盘实现触摸功能
  • ¥25 matlab无法将表达式转换为双数组怎么解决?
  • ¥15 单片机汇编语言相关程序
  • ¥20 家用射频美容仪技术规格