为什么 opcache 没有被刷新? [英] Why is the opcache not flushed?

查看:65
本文介绍了为什么 opcache 没有被刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Laravel 8 中使用 guzzlehttp/guzzle 包.升级到 PHP 8 后,我得到:

I use the guzzlehttp/guzzle package in Laravel 8. After upgrading to PHP 8, I get:

Symfony\Component\ErrorHandler\Error\FatalError:无效的操作码 117/2/0.在第 412 行的文件 ../vendor/defuse/php-encryption/src/Core.php 中

nginx 配置:

server {
  listen 80;
  root /var/www/finex_production/public/;

  index index.php;
  server_name ff.loc;
  
  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
  }

  client_max_body_size 256M;
  fastcgi_read_timeout 900;
}

PHP 7.4 已删除.

如果我之前调用opcache_reset();,我不会出错.

If I call opcache_reset (); before, I don't get error.

推荐答案

我通过在 php.ini 中临时设置 opcache.optimization_level=0 来修复它.

I fixed it by temporarily setting opcache.optimization_level=0 in php.ini.

仍然根据这篇文章,这是一个已知的错误,应该是PHP 8.0.1

Still according to this post, it's a known bug which should be fixed in PHP 8.0.1

这篇关于为什么 opcache 没有被刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆