apc

Global/session scoped values in PHP

Is there a standard way of dealing with globally scoped variables in PHP? Session scoped? From the research I've done, it looks like the options are mostly addons or external. APC might work, but would be limited to a single PHP instance and not so useful for a farm of servers. Memcached seems like it would work, but I was hoping to find...

Incorrectly set up APC for PHP?

I decided to install APC to speed up the site that I work for. Sadly, I found out that it was already installed and enabled(The developer who first worked on the servers has moved on). Then I decided to check the usage of it to see if it needs more memory allocated to it or not. This is when I discovered something weird. A simple file w...

best way to obtain a lock in php

I'm trying to update a variable in APC, and will be many processes trying to do that. APC doesn't provide locking functionality, so I'm considering using other mechanisms... what I've found so far is mysql's GET_LOCK(), and php's flock(). Anything else worth considering? Update: I've found sem_acquire, but it seems to be a blocking loc...

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 Apache. Is it possible to configure APC to use the same cache for both CLI and web invocati...

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 be involved, but I don't know how to use it.) (One of the reasons I think its not shared ...

APC for windows alternative download

I am trying to install APC on windows but the site http://pecl4win.php.net/ is down for a while now with the message: The pecl4win build box is temporarily out of service. We're preparing a new build system. Is there an alternative download for this ? Or can anyone share theirs ? ...

PHP APC and Imagick with cpanel

I currently purchased a dedicated server hosted at iWeb and got it administered by them. I recently asked after registration to add php_apc and php_imagick to the available libraries. It seems according to them that it is not possible as it is not supported with cPanel. I would apparently need to do that myself... is there any risks to...

Can APC interrupt WSAWaitForMultipleEvents?

Can APC (Asynchronous Procedure Calls) interrupt WSAWaitForMultipleEvents()? (C++) MSDN does not list this WSAWaitForMultipleEvents() on the APC page ( http://msdn.microsoft.com/en-us/library/ms681951.aspx ). I do not have visual studio in front of me right now to try it. Can somebody please let me know? Thanks ...

Memcached vs APC which one should I choose?

I ready this article: http://www.mysqlperformanceblog.com/2006/09/27/apc-or-memcached/ from way back when.. I want to get the best cacheing engine available so that my application is really fast. Of cource I don't want to overcache but I want to at least choose the best thing out there. In that article it says memcached is slow and apc i...

Problems with APC on publish

We've recently enabled APC on our servers, and occasionally when we publish new code or changes we discover that the source files that were changed start throwing errors that aren't reflected in the code, usually parse errors describing a token that doesn't exist. We have verified this by running php -l on the files the error logs say a...

APC not recommended for production?

I have started having problems with my VPS in the way that it would faill to serve the pages on all the websites. It just showed a blank page, or offered to download the php file ( luckily the code was not in the download file :) ). The server was still running, but this seemed to be a problem with PHP, since i could login into WHM. If...

Opcode caching in APC and missing files

We are using APC as an opcode cache. Is there a way to get APC to cache the non-existence of a file? We have set apc.stat = 0 and apc.include_once_override = 1. Is there something more to do to improve the performance of calling include_once on a file that may not be present on the filesystem? If it is present, obviously we want to i...

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, but my main question is, how do I implement it on a large scale? PHP documentation talks ...

php5 won't load extensions through apache, but modules all show using php -m?

Hi! I've been trying to install PHP5-APC (http://uk.php.net/apc/). I used macports to get this far. When i run php -m , i get a list of lots of modules including apc, but the apache error log gives out: PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - (null) i...

How to clear APC cache entries?

I need to clear all APC cache entries when I deploy a new version of the site. APC.php has a button for clearing all opcode caches, but I don't see buttons for clearing all User Entries, or all System Entries, or all Per-Directory Entries. Is it possible to clear all cache entries via the command-line, or some other way? ...

apc vs eaccelerator vs xcache

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? Thanks ...

APC results blank page after MySQL root password change

I have APC installed via cPanel everything worked just fine until I set new MySQL root password. After MySQL root password changed my web sites hosted on this box resulting blank page. When I disable APC everything works fine, so I guess problem is APC related. reinstall APC via cPanel does not help. Q1: does APC need MySQL root pass...

PHP APC - What happen when APC cache is full?

What happen 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? Thanks. ...

APC Caching with variable includes

I have been doing some research on APC Caching with PHP and found that conditional includes just don't work. Like: if($a) { include('a.php'); } else { include('b.php'); } My question is: Can I get around this with variable includes? Such as: if($a) { $file = 'a.php'; } else { $file = 'b.php'; } include($file); Wo...

Where does APC store its opcode and user variable cache?

The reason I ask is because when using top I don't see a process for anything like APC. So I assume that the memory usage would be accounted for in an apache process. Is that the case, and does that mean that the memory APC is using is replicated in each apache process, thereby taking up potentially much more memory than what was origi...