Questions tagged [apc]

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

963 questions
28
votes
4 answers

What to use instead of apc user data cache in php 5.5?

PHP 5.5 includes zend opcache by default, which basically means that almost nobody will use APC. But what to use instead of the user data cache part of APC (apc_store & apc_fetch & similar)? One use case where I really like to use APC user data…
m6k
  • 678
  • 5
  • 14
27
votes
3 answers

How to check if APC opcode cache is working fine in PHP?

I am using PHP with APC cache enabled: apc.cache_by_default => On apc.enabled => On apc.ttl => 7200 Now how can I know if it is using the opcode cache 100%. For example, let us say that I have this PHP file: Now after…
Lina
  • 2,090
  • 4
  • 20
  • 23
27
votes
4 answers

How do I know if any PHP caching is enabled?

I used to think caching was very hard to install so I've never done it... After reading about APC, it seems pretty easy to install. I always thought I would have to modify lots of PHP code inside my application to use it lol. Anyways, I am wanting…
Joker
  • 1,133
  • 7
  • 18
  • 22
27
votes
7 answers

How install apcu as php7 extension on debian

I have seen this tutorial for ubuntu. http://thereluctantdeveloper.com/2015/12/quick-and-dirty-php-70-set-up-on-ubuntu-1404-with-apcu It's not clear for me after step(git clone). I need apcu extension for my app to perform faster. Please guide…
ns dns
  • 271
  • 1
  • 3
  • 4
25
votes
4 answers

PHP APC Potential Cache Slam Averted for Key

I'm receiving this error while trying to use apc_store(). I googled it and saw that this was APC timebomb bug and saw some fixes which suggested adding apc.slam_defense = Off; to php.ini. I need to know whether this has happened because of a…
shyam
  • 6,681
  • 7
  • 28
  • 45
24
votes
1 answer

php semaphore doesn't work

I've got the following code and the semaphore wouldn't lock it as expected. (I'm aware of apc_inc. This is not what I'm looking for.) $semkey = sem_get(123); sem_acquire($semkey); $count = apc_fetch('count111'); if(!$count) $count =…
Alex
  • 11,479
  • 6
  • 28
  • 50
23
votes
1 answer

What does the cryptic GC cache entry mean

Time to time, I receive this strange warning message. It is usually gone on page reload. What does that mean. I googled but to no avail. Warning: include(): GC cache entry '/.../...class.php' (dev=2049 ino=37120489) was on gc-list for 3840 seconds…
Josef Sábl
  • 7,538
  • 9
  • 54
  • 66
22
votes
2 answers

Difference between Memcache, APC, XCache and other alternatives I've not heard of

At work, we've recently started designing an application to me "large scale" (we're engineering for the potential to serve up many millions of hits a day). One of the senior devs and the sysadmin have set up memcache on the server. As I…
Alex C
  • 16,624
  • 18
  • 66
  • 98
22
votes
3 answers

How does memcache with MySQL work?

I am trying to understand (and probably deploy) memcached in our env. We have 4 web servers on loadbalancer running a big web app developed in PHP. We are already using APC. I want to see how memcached works? At least, may be I don't understand how…
Kevin Rave
  • 13,876
  • 35
  • 109
  • 173
21
votes
4 answers

apc_add() versus apc_store()

I know that apc_store() overwrites the key if it already exists, so I know the difference, my question is just: What's the better method/best practice?
Gerben Jacobs
  • 4,515
  • 3
  • 34
  • 56
21
votes
2 answers

pecl install apc isn't working. shtool does not exist

I am an absolute newbie…didn't learn about SSh till an hour ago and got my first VPS 2 hours ago. Still learning! So I'm installing MediaWiki and need to add APC extension. But having a lil trouble. Any ideas/tips? [root@www ~]# pecl install…
Jimmy Wang
  • 239
  • 1
  • 2
  • 5
20
votes
1 answer

what is APC internal debugging?

I got a prompt with Enable internal debugging in APC [no]:. While installing APC. what is APC internal debugging? Is is better to keep it enabled? Tried to do a search but couldn't find an answer!
ThinkingMonkey
  • 12,539
  • 13
  • 57
  • 81
20
votes
3 answers

How to share APC cache between several PHP processes when running under FastCGI?

I'm currently running several copies of PHP/FastCGI, with APC enabled (under Apache+mod_fastcgi, if that matters). Can I share cache between the processes? How can I check if it's shared already? (I think the apc.mmap_file_mask ini setting might…
mjs
  • 63,493
  • 27
  • 91
  • 122
20
votes
9 answers

Why would apc_store() return false?

The documentation on php.net is very spotty about causes of failure for APC writes. What kind of scenarios would cause a call to apc_store() to fail? There's plenty of disk space available, and the failures are spotty. Sometimes the store…
jodonnell
  • 49,859
  • 10
  • 62
  • 67
20
votes
4 answers

PHP APC in CLI mode

Does APC module in PHP when running in CLI mode support code optimization? For example, when I run a file with php -f will the file be optimized with APC before executing or not? Presuming APC is set to load in config file. Also, will the…
Matic
  • 469
  • 2
  • 8
  • 16
1
2
3
64 65