dongleiwei2182 2018-08-12 21:45
浏览 555
已采纳

更新PHP7后的Opcache不会在phpinfo中显示

I updated php from 7.0.31 to 7.2.8. Then installed php-fpm and nginx. Now I have next installed packages:

php-bcmath.x86_64                  5.4.16-45.el7                     @base
php-cli.x86_64                     5.4.16-45.el7                     @base
php-common.x86_64                  5.4.16-45.el7                     @base
php-fedora-autoloader.noarch       1.0.0-1.el7                       @epel
php-gd.x86_64                      5.4.16-45.el7                     @base
php-mbstring.x86_64                5.4.16-45.el7                     @base
php-mcrypt.x86_64                  5.4.16-7.el7                      @epel
php-mysql.x86_64                   5.4.16-45.el7                     @base
php-pdo.x86_64                     5.4.16-45.el7                     @base
php-pear.noarch                    1:1.9.4-21.el7                    @base
php-pecl-igbinary.x86_64           1.2.1-1.el7                       @epel
php-pecl-memcached.x86_64          2.2.0-1.el7                       @epel
php-pecl-msgpack.x86_64            0.5.5-5.el7                       @epel
php-pecl-zendopcache.x86_64        7.0.5-2.el7                       @epel
php-php-gettext.noarch             1.0.12-1.el7                      @epel
php-process.x86_64                 5.4.16-45.el7                     @base
php-tcpdf.noarch                   6.2.13-1.el7                      @epel
php-tcpdf-dejavu-sans-fonts.noarch 6.2.13-1.el7                      @epel
php-tidy.x86_64                    5.4.16-7.el7                      @epel
php-xml.x86_64                     5.4.16-45.el7                     @base
php72-php-cli.x86_64               7.2.8-1.el7.remi                  @remi-safe
php72-php-common.x86_64            7.2.8-1.el7.remi                  @remi-safe
php72-php-fpm.x86_64               7.2.8-1.el7.remi                  @remi-safe
php72-php-json.x86_64              7.2.8-1.el7.remi                  @remi-safe
php72-php-mysqlnd.x86_64           7.2.8-1.el7.remi                  @remi-safe
php72-php-opcache.x86_64           7.2.8-1.el7.remi                  @remi-safe
php72-php-pdo.x86_64               7.2.8-1.el7.remi                  @remi-safe
php72-php-pear.noarch              1:1.10.5-6.el7.remi               @remi-safe
php72-php-pecl-igbinary.x86_64     2.0.7-1.el7.remi                  @remi-safe
php72-php-pecl-memcached.x86_64    3.0.4-2.el7.remi                  @remi-safe
php72-php-pecl-msgpack.x86_64      2.0.2-4.el7.remi                  @remi-safe
php72-php-process.x86_64           7.2.8-1.el7.remi                  @remi-safe
php72-php-xml.x86_64               7.2.8-1.el7.remi                  @remi-safe
php72-runtime.x86_64               1.0-1.el7.remi                    @remi-safe

And my site working by apache now. Nginx + php-fpm I only try set. And when I see phpinfo from apache, I find information about opcache:

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.8, Copyright (c) 1999-2018, by Zend Technologies

when I see phpinfo from nginx I don't see information about opcache:

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies 

In phpinfo from nginx these lines differ of apache.

Configuration File (php.ini) Path 
/etc/opt/remi/php72 
Loaded Configuration File 
/etc/opt/remi/php72/php.ini 
Scan this dir for additional .ini files 
/etc/opt/remi/php72/php.d 

but php.ini files same and has path to opcache.so.

  • 写回答

1条回答 默认 最新

  • duanche2007 2018-08-13 11:13
    关注

    I just deleted php72-php-fpm and installed again. yum install php72-php-fpm.x86_64 php72-php-devel.x86_64 php72-php-gd.x86_64 php72-php-mysqlnd.x86_64 php72-php-mbstring.x86_64 php72-php-pecl-igbinary.x86_64 php72-php-opcache.x86_64 php72-php-pecl-memcached.x86_64 php72-php-pecl-mcrypt.x86_64 php72-php-pecl-zip.x86_64 php72-php-pecl-msgpack.x86_64

    and did settings for ini files in /etc/opt/remi/php72/php.d memcached.ini and etc.

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

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配