apc

APC File Cache not working but user cache is fine

 ̄綄美尐妖づ 提交于 2019-12-03 17:14:06
Summary: I have PHP(5.3.8) installed as an Apache Module, and installed APC via PECL. The User cache is working fine but the File Cache is not working ( I do have apc.cache_by_default set to 1 so that's not the issue) Detail: I have just got a VPS (with cPanel/WHM) to test what gains i could get in my application with using apc file cache AND user cache. So I got the PHP 5.3 compiled in as a DSO (apache module). Then installed APC via PECL through SSH. (First I tried with WHM Module installer, it also had the same problem, so I tried it via ssh) All seemed fine and phpinfo showed apc loaded

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

六眼飞鱼酱① 提交于 2019-12-03 15:44:21
问题 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 cache are "versions" of static assets (javascript, css..). Whenever I reference static file, I add hash of its content into the url (e.g. <script src=/script.js> will became <script src=/script.js?v=hash>), so that browser always uses current version

Disable or remove apc

纵饮孤独 提交于 2019-12-03 15:16:17
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()); return(double) $a[0] + $a[1]; } $Start = getTime(); ?> <?php require_once("includes/connection.php"

apc.filters by path?

谁都会走 提交于 2019-12-03 13:32:10
How would I use the apc.filters parameter in APC opcode caching to not cache certain paths? For example, I want caching to be active for anything under the path: "/var/www/vhosts" and exclude paths like "/usr/share/psa-horde/" I tried using apc.cache_by_default = 0 apc.filters = "+/var/www/vhosts" and apc.cache_by_default = 1 apc.filters = "-/usr/share/psa-horde/" But neither worked as I expected. http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters Should the filter be something more like "+/var/www/vhosts/*" (note the wildcard)? I'm afraid this isn't possible because of the way

Will killed process/thread release mutex?

时间秒杀一切 提交于 2019-12-03 12:55:09
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 unlocked automatically, if the process locked the mutex and then was killed? Or is there a way to unlock it automatically? Edit: As it turns out, dying processes and threads have similar behavior in this situation, which depends on robust attribute of mutex . Aaron Digulla That depends on the type of mutex. A "robust" mutex will survive the death of

How install apcu as php7 extension on debian

自作多情 提交于 2019-12-03 10:42:14
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 to install apcu extension for php 7 on debian. First, I'm assuming you installed PHP7 using the DotDeb APT Repository . If not, this is how you should install it. Once PHP7 is installed and working properly, and assuming there are no other versions of PHP installed on the system, install apcu via: sudo apt-get install php7.0-dev pecl channel-update pecl

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

流过昼夜 提交于 2019-12-03 05:23:12
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 cache are "versions" of static assets (javascript, css..). Whenever I reference static file, I add hash of its content into the url (e.g. <script src=/script.js> will became <script src=/script.js?v=hash>), so that browser always uses current version and can cache it permanently. I can imagine using redis or memcache to store the hashes of static files,

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

限于喜欢 提交于 2019-12-03 05:02:59
问题 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 apc` downloading APC-3.1.13.tgz ... Starting to download APC-3.1.13.tgz (171,591 bytes) .....................................done: 171,591 bytes 55 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No:

PHP APC Potential Cache Slam Averted for Key

ε祈祈猫儿з 提交于 2019-12-03 04:29:42
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 programming error, and if yes, how to fix it. This is the code segment: if ($data = apc_fetch("foo")) { $an_array = $data; } else { /* couple of lines */ apc_store("circles", $an_array); // This is where I get the error } This script will be called frequently in my deployed system. I hope I've provided enough info Thanks in advance Since APC 3.1.3, it

Anyone successfully serving high traffic with PHP 5.4.4 and APC 3.1.10? [closed]

匆匆过客 提交于 2019-12-03 04:22:28
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Call to undefined method after upgrading to PHP 5.4.0 mentions a few APC bug-reports from March 2012. My concrete question is: Is PHP 5.4.4 (or thereabouts) stable in combination with APC 3.1.10 (released in April, but listed as "beta" rather than "stable")?