duanliyi5997 2016-03-09 11:48
浏览 80

当apc.serializer = default时,启用OPcache会中断APC

I recently experienced something strange and I haven't been able to find any explanation when googling.

Setup: We're using APC

We're using APC (3.1.15-dev) as the 1st level user data cache for our PHP (v5.5.10) web app. APC opcode cache is disabled. We also have apc.serializer = default (this setting turns out to be important).

Challenge: We want to enable OPcache

Unfortunately, when enabling OPcache, the APC cache experiences problems when trying to save a value.

Solution: Specifying a serializer for APC

apc.serializer = igbinary

When changing this setting, APC starts working normally again.

Question: What's going on?

Though we solved the problem, I'd like to better understand the issue and what led to it.

I'm not sure which serializer was used as the default for APC before specifying igbinary, but I can find out if it's important.

Does OPcache somehow change the default serializer?

Any idea what was going on? Any insights from the community would be highly appreciated :-)

  • 写回答

1条回答 默认 最新

  • duandu1966 2016-08-05 19:38
    关注

    PHP 5.5.x cannot use APC. You need to use APCu. See below:

    PHP version: works with all PHP versions up to PHP 5.4 (3.1.13 - beta release)
    Latest beta version: 3.1.13 (2012-09-03)
    Latest stable version: 3.1.9 (2011-05-14)
    Status: Dormant, potentially dead (no new releases since September 2012)

    (source)

    评论

报告相同问题?

悬赏问题

  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥15 关于超局变量获取查询的问题
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集
  • ¥15 在启动roslaunch时出现如下问题
  • ¥15 汇编语言实现加减法计算器的功能