Why is the opcache not flushed?

感情迁移 提交于 2021-01-04 07:33:42

问题


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

Symfony\Component\ErrorHandler\Error\FatalError: Invalid opcode 117/2/0. in file ../vendor/defuse/php-encryption/src/Core.php on line 412

nginx config:

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 is removed.

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


回答1:


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

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



来源:https://stackoverflow.com/questions/65034752/why-is-the-opcache-not-flushed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!