Enabling OPcache breaks APC when apc.serializer=default

609 Views Asked by At

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

There are 1 best solutions below

0
On

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)