apc

Disable or remove apc

好久不见. 提交于 2019-12-09 13:35:15
问题 I installed APC on my ubuntu 11.04 linux and I want to make some performance benchmarks to see what's the speed improvement over PHP without APC but I don't know how to disable/remove the APC. I tried to empty my apc.ini files but it didn't worked. Still after I load a page for the first time, the page will be stored in the cached and the second time I load the page, it loads much faster. Here's a PHP file that I use to measure the time. <?php function getTime() { $a = explode (' ',microtime(

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

倖福魔咒の 提交于 2019-12-08 15:27:01
问题 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 Apache. Is it possible to configure APC to use the same cache for both CLI and web invocations? 回答1: Not possible.. The only way to accomplish something like what your asking is to use something like memcacheD. Or run what you need to run through your

Does it possible to store sqlite's :memory: tables in APC?

我只是一个虾纸丫 提交于 2019-12-08 04:21:57
问题 After reading PHP / SQLite - Copying a table from disk to memory I must ask this question. Let's say I have a web page that uses some data upon every page load, I want it to be in shared memory since the data could get large, APC could solve that. I need to be able to search the data and use aggregate functions etc.. so sql is the way to go. The ultimate solution would be sqlite's :memory: table, but in PHP, such tables won't be persistent. Does it possible to store sqlite's :memory: tables

“Call to undefined method” after apache reload using apc opcode cache

拈花ヽ惹草 提交于 2019-12-08 04:05:57
问题 we are using php5.4, apc 3.1.13 with apache2 and mod_php and have every now and then the problem that apc opcode cache seems to forget cached data after a apache reload (for example after a logrotate). This results sometimes in fatal errors with "Call to undefined method". We do not change the files in any way before the error occurs, and after an apache restart the problem is gone. When we release a new version of our code, we have the next and the current version of our application in the

PHP apc/apcu cache do not keep intermediate result while shmop do, why?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 02:55:51
问题 I've encounter a problem with PHP to store intermediate result locally. With APC : apc_store("foo", "bar"); $ret = apc_fetch("foo"); With APCu : apcu_store("foo", "bar", 0); $ret = apcu_fetch("foo"); I store with apc_store/apcu_store under php_cli on a php script, and fetch with apc_fetch/apcu_fetch on another php script, and find the $ret to be empty. While, with shmop : $shmKey = ftok(__FILE__, 't'); $shmId = shmop_open($shmKey, "c", 0644, 1024); $dataArray = array("foo" => "bar"); shmop

Weird 500 Internal Server Error (firebug, php, display_errors, ajax)

筅森魡賤 提交于 2019-12-08 02:51:39
问题 On one page I am doing multiple AJAX calls. All calls return responses successfully but the last one (not related to other ajax calls) returns 500 internal server error as response code (as firebug tells). However, in spite of error code, correct content is returned from that AJAX call. To my amazement, when I set display_errors option in php.ini as On, the error disappears and response in rendered on the page. I have setup error logging to a file but no error is logged corresponding to the

No performance gain with APC on WampServer

穿精又带淫゛_ 提交于 2019-12-07 13:46:29
问题 I'm working on a Windows workstation, on which I use WampServer as my development platform, to write PHP applications which are then run on Linux. I'm pretty used to APC on Linux, which is blazing fast and a must have for me. However, I'm always surprised to get no performance gain when I use it on Windows. This leads to generation times close to 1 second per page, on applications relying heavily on the Zend Framework for example. Most of this time is spent parsing PHP files (I verified that

Deploying Symfony2 app with Capifony - APC loader still uses previous release

余生颓废 提交于 2019-12-07 08:46:08
问题 I've recently upgraded my Symfony2 application to 2.1 and migrated it to a new server, so I figured I'd configure Capifony to make deploying simpler. Everything has gone great except for the fact that it now doesn't make use of the APCLoader, so I've had to comment this out temporarily until it's sorted. Here's the relevant code from app.php : $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; // Use APC for autoloading to improve performance. // Change 'sf2' to a unique prefix in

APC cache fragmentation problem

拟墨画扇 提交于 2019-12-07 08:04:07
问题 I'm running APC (php cache) on a medium website (13 000 visits a day) on a CentOS server 5 running php 5.3.3 with APC 3.1.4 with 4Gb of RAM. In the last weeks I'm experiencing many " unable to allocate memory for pool " errors in logs, and often the site goes down. I think the problem is in APC. From the stats I see that the cache is full after an hour or two, and the fragmentation always jumps to 100%. This are my config settings of apc.ini: apc.cache_by_default 1 apc.canonicalize 0 apc

Selecting an appropriate cache mechanism

拈花ヽ惹草 提交于 2019-12-07 06:02:43
问题 My setup: 4 webservers Static content server (NFS mount) 2 db servers 2 "do magic" servers An additional 8 machines designated multi-purpose. I'm writing a wrapper for three caching mechanisms so that they can be used in a somewhat normalized manner: Filesystem, Memcached and APC. I'm trying to come up with examples for use (and what to actually put in each cache). File System Handles content that we generate and then statically serve. RSS feeds, old report data, user specific pages, etc...