apc

apc vs eaccelerator vs xcache

旧街凉风 提交于 2019-12-27 16:33:08
问题 Im doing research on which one of these to use and I can't really find one that stands out. Eaccelerator is faster than APC, but APC is better maintained. Xcache is faster but the others have easier syntax. Anyone have recommendations on which to use and why? 回答1: APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :) It's fairly easy to install and certainly speeds things up. 回答2: Check out benchmarks and comparisons: here and here and there 回答3: APC

APC File Upload Progress Status getting stuck at 2100000 Bytes (~2.1MB)

梦想的初衷 提交于 2019-12-25 08:23:29
问题 For some odd reason, the apc file upload status gives me the file size until it gets to 2,100,000 at which point it stops. I am able to successfully upload files smaller than 2.1MB but everything over 2.1MB is failing because of this error. I checked the apc.max_upload_size variable and bumped it up to 100M but still no luck. I've been monitoring $status['current'] for a number or different uploads and this number can never get over 2100000. Something tells me there is some other setting that

apc_clear_cache not working from command line in php

假如想象 提交于 2019-12-25 07:59:46
问题 I have a php script which clears apc. The script is working fine, when I opening it using browser, but when I am running that file from command line, it is not clearing cache. I checked for apc.enable_cli setting, and that is also on (check the screenshot). And here is my php-code <?php if (isset($argv[1])) { $key = $argv[1]; $info = apc_cache_info("user"); foreach ($info['cache_list'] as $obj) { if (strstr($obj['info'], $key)) { apc_delete($obj['info']); } } } else { apc_clear_cache("user");

Attempted to call function “apc_fetch” from namespace “Doctrine\Common\Cache”

人走茶凉 提交于 2019-12-25 03:38:25
问题 I've APC installed on my server, wondering if I'm missing something else. I want to be able to cache a 3rd party API request. code - $cache = new \Doctrine\Common\Cache\ApcCache(); $data = $cache->fetch('namesaved'); if($data === false) { $cache->save('namesaved','keyword'); } returns - Attempted to call function "apc_fetch" from namespace "Doctrine\Common\Cache" in vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 40. 回答1: You are getting this error because the function apc

APC User Cache Key collisions on multiple sites

筅森魡賤 提交于 2019-12-24 17:37:50
问题 What's the best option for avoiding key collisions between multiple sites running on the same server using APC for user caching? I've run into issues where 2 or more sites were using the same cache key and expecting different types of items to be stored under it--one expecting a json string, the other an array, another an object. Is their a way to segment APC by site? BTW: I'm using APC with Apache running prefork and mod_php. 回答1: Perhaps you could append the server hostname to the key, you

PHP APC not working with some chars in key?

こ雲淡風輕ζ 提交于 2019-12-24 10:17:29
问题 I have a few test installments of zend server CE (php5.3), one on Mac 10.8.2, one on Linux EC2 instance, both using the default APC implementation (zend data cache) that comes with the installation. On both machines, I call: apc_store("Installation:1234:lastActivity", "x", 120); Then I call apc_fetch for that key. On the Mac, apc_fetch works. On the Linux, apc_fetch returns FALSE and fails. Now for the weird stuff on the Linux box, a few tests I made: 1. If I remove the last char in the key

PHP APC Error Loading apc.so

家住魔仙堡 提交于 2019-12-24 00:59:56
问题 I recently installed PHP APC on our server via our WHM panel (Web Host Manager). After a successful install, I thought everything was fine. However the next day I noticed our error_log file was getting quite large, after inspection I noticed the following line many times: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so: cannot open shared object file: No

APC vs pecl uploadprogress

旧城冷巷雨未停 提交于 2019-12-23 20:25:44
问题 In the Status Report page in drupal, i usually find this message (on fresh installation): Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC. But i never understood why its preferred the PECL uploadprogress library over APC, and that's my question today. Is pecl uploadprogress faster, take less system resources, or is more easy to install/configure/use

How to clear Doctrine APC cache for production?

一个人想着一个人 提交于 2019-12-23 10:19:09
问题 I have this issue when I add a column to one of my entities and release it for production I have to restart Apache in order to clear Doctrine metadata APC/APCU cache. I have tried all commands below but none worked for me: php -r "apc_clear_cache();" php -r "apcu_clear_cache();" sudo php app/console doctrine:cache:clear-metadata sudo php app/console doctrine:cache:clear-query sudo php app/console doctrine:cache:clear-result I get this error message for --env=prod sudo php app/console doctrine

PHP ob_start vs opcode APC, explain differences and real world usage?

半腔热情 提交于 2019-12-23 08:46:56
问题 Premise: I'm not trying to reinvent the wheel, I'm just trying to understand. Output caching can be implemented easily: //GetFromMyCache returns the page if it finds the file otherwise returns FALSE if( ($page = GetFromMyCache($page_id)) !== FALSE ) { echo $page; //sending out page from cache exit(); } //since we reach this point in code, it means page was not in cache ob_start(); //let's start caching //we process the page getting data from DB //saving processed page in cache and flushing it