简体   繁体   English

Opcache导致PHP致命错误:找不到类'\\ xa0L \\ xdaor \\ x7f'

[英]Opcache causes PHP Fatal error: Class '\xa0L\xdaor\x7f' not found

Every now and then an image resizing script on our site will fail with the following error: 我们网站上的图像大小调整脚本偶尔会失败并出现以下错误:

PHP Fatal error: Class '\\xa0L\\xdaor\\x7f' not found ... on line 4 PHP致命错误:在第4行找不到类'\\ xa0L \\ xdaor \\ x7f'

The actual line 4 of the script in question is: 有问题的脚本的实际第4行是:

$photo = new Photo($photo_id);

I have no idea where the hex code \\xa0L\\xdaor\\x7f in the Error log comes from. 我不知道错误日志中的十六进制代码\\xa0L\\xdaor\\x7f来自\\xa0L\\xdaor\\x7f The script will run fine and it runs relatively frequently for a day or two, then it starts failing every time, with that error. 该脚本运行正常并且相对频繁地运行一两天,然后每次都会因为该错误而开始失败。

If I run opcache_reset() , the errors stop. 如果我运行opcache_reset() ,错误就会停止。

Anyone have any idea what might be causing this issue? 任何人都知道可能导致这个问题的原因是什么?

UPDATE: I got no response - so I've simply excluded this file from the opcode cache using opcache.blacklist_filename . 更新:我没有响应 - 所以我只是使用opcache.blacklist_filename从操作码缓存中排除了这个文件。

Sometimes my whole PHP response was a bunch of hex codes like this. 有时我的整个PHP响应都是这样的一堆十六进制代码。

I had that when opcache.fast_shutdown="1" was set. opcache.fast_shutdown="1"被设置时我就知道了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM