Leo Jiang
Leo Jiang

Reputation: 26085

Using APC in PHP 5.5

I want to functions like apc_store() and apc_fetch() in my PHP application (I never used APC before). However, my understanding is that APC cannot be installed on PHP 5.5+ because PHP 5.5+ has its own opcode cache. If I plan on upgrading to PHP 5.5+ in the future, should I use apc_* functions? If I shouldn't, are there "future safe" alternatives to APC?

Upvotes: 1

Views: 271

Answers (2)

chh
chh

Reputation: 593

As of 5.5 and onward I replaced on my setups APC with APCu. APCu is APC without the opcode caching. It also provides the apc_ functions and passes checks for extension_loaded('apc').

Make sure you use at least v4.0.2 of this extension. Prior releases had a bug in which the apc_ functions were not available even when the APC compat mode was turned on.

Also see the answers to this question.

Upvotes: 1

Alister Bulman
Alister Bulman

Reputation: 35149

The variable storage part of APC has been left in the APCU package. It's APC, without the code cache.

Upvotes: 0

Related Questions