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
13
votes
3 answers

PHP APC, educate me

I'm currently implementing memcached into my service but what keeps cropping up is the suggestion that I should also implement APC for caching of the actual code. I have looked through the few tutorials there are, and the PHP documentation as well,…
James
  • 5,942
  • 15
  • 48
  • 72
13
votes
3 answers

Does a graceful Apache restart clear APC?

Will calling $ httpd graceful clear out the APC cache, or do I have to do a full-blown $ httpd restart to do it? (Keeping in mind that I know there are better ways to do it, like calling apc_clear_cache() programmatically).
jodonnell
  • 49,859
  • 10
  • 62
  • 67
13
votes
6 answers

How to make APC (PHP Cache) work?

I've read about APC that it speeds up multiple php file sites. So I have this particular project in PHP with many files and i discover that require_once and parsing only class definitions (without executing them) takes most time. So I've installed…
Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236
13
votes
4 answers

PHP and the million array baby

Imagine you have the following array of integers: array(1, 2, 1, 0, 0, 1, 2, 4, 3, 2, [...] ); The integers go on up to one million entries; only instead of being hardcoded they've been pre-generated and stored in a JSON formatted file (of…
Mahn
  • 16,261
  • 16
  • 62
  • 78
13
votes
2 answers

sudo pecl install apc error on os x lion

I tried installing APC with pecl on OS X Lion (sudo pecl install apc) and it complained about a missing pcre.h file: In file included from /private/tmp/pear/temp/APC/apc.c:44: /usr/include/php/ext/pcre/php_pcre.h:29:10: fatal error: 'pcre.h' file…
Zsub
  • 1,799
  • 2
  • 15
  • 28
13
votes
2 answers

PHP APC: What happens when APC cache is full?

What happens when you try to add a variable into APC and the APC cache is full? Does it automatically remove least used variable from the cache?
cory
12
votes
4 answers

Symfony / PHP7 APC -> APCu

I have issue with PHP7 and APCu. After installation I got this error: Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch() APCu is 100% enabled, I see it in the phpinfo(); And when I try apcu_fetch() it works. How to use APCu…
user3703456
11
votes
3 answers

php caching techniques

Hi this is more of an information request really. I'm currently working on a pretty large event listing website and have started thinking about some caching for the data sets being used. I have been messing with APC this week and have seen some real…
Mike Waites
  • 1,688
  • 3
  • 19
  • 26
11
votes
4 answers

How can I get PHP to use the same APC cache when invoked on the CLI and the web?

I'm using APC to cache user variables (with the apc_store/apc_fetch commands). I've also enabled APC for the CLI with the option "apc.enable_cli = 1". However, the CLI version of PHP seems to access a different APC cache from the version used by…
Ben Dowling
  • 17,187
  • 8
  • 87
  • 103
11
votes
5 answers

how to install apc for php on mac osx mamp?

I am running a mac with mamp and mamp pro. How do I check if I have APC enabled and if its not enabled or not installed how do I install it? I am trying to get the APC upload loader to work that I found online and it gets stuck on NAN% when im…
michael
  • 329
  • 2
  • 4
  • 10
11
votes
1 answer

Programmatically rebuild .exd-files when loading VBA

After updating Microsoft Office 2007 to Office 2010 some custom VBA scripts embedded in our software failed to compile with the following error message: Object library invalid or contains references to object definitions that could not be…
aspartame
  • 4,622
  • 7
  • 36
  • 39
11
votes
1 answer

Will killed process/thread release mutex?

Several processes access shared memory, locking it with the mutex and pthread_mutex_lock() for synchronization, and each process can be killed at any moment (in fact I described php-fpm with APC extension, but it doesn't matter). Will the mutex be…
fadimko
  • 113
  • 1
  • 6
11
votes
1 answer

APCu and Symfony2

Since PHP 5.5 broke APC in favor of their own cache, I'm trying to get my Symfony2 project running with APCu instead, and it doesn't like it: $ php app/console cache:clear --env=prod --no-warmup PHP Fatal error: Call to undefined function…
Tom
  • 2,688
  • 3
  • 29
  • 53
11
votes
3 answers

Full alternative to APC user data cache for PHP?

I have a large site heavily depending on APC, mainly storing custom data using apc_add and apc_fetch functions. It seems that APC is not fully compatible with PHP 5.4 and that PHP 5.5 has built in Zend OPcache. What alternative do I have to replace…
Frodik
  • 14,986
  • 23
  • 90
  • 141
11
votes
2 answers

PHP-FPM - upstream prematurely closed connection while reading response header

Already saw this same question - upstream prematurely closed connection while reading response header from upstream, client But as Jhilke Dai said it not solved at all and i agree. Got same exact error on nginx+phpFPM installation. Current…
Demontager
  • 217
  • 1
  • 5
  • 12