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...
Hi guys,
I've been using APC caching functions and it's been phenomenal. I was thinking, why not just cache all of my functions, and load them whenever I need to (kind of like frameworks actually).
function Foo {echo 'bar';}
$foo = Foo;
apc_store('foo',$foo);
And then whenever Foo is needed, I'd just use apc_fetch. Is that more effic...
I want to use APC for php for storing and fetching values (function calls and return values) between a endless running php process and multiple client processes. The endless running process constantly checks for newly stored values.
I am running php as a Apache module on WinXP. For each APC function call a apc.lock.* file is placed in th...
Hi all,
I am thinking of integrating some caching logic in my app.
Mainly, it will cache objects and objects lists to APC. I will
implement a way for them to be automatically invalidated, once the object
is updated/removed.
However, what about atomicity? How can I make sure that operations are atomic?
Thanks
...
How can I install APC on Windows? I am using PHP 5.3, Windows 7 x64.
I used
pecl install apc
I got
C:\PHP>pecl install apc
downloading APC-3.0.19.tgz ...
Starting to download APC-3.0.19.tgz (115,735 bytes) ............
done: 115,735 bytes 47 source files, building
WARNING: php_bin c:\php\php.exe appears to have a suffix \php.exe, ...
Any ideas please?
Thanks.
...
I have a shell background convertor on my video website and I can't seem to get APC to delete a key as a file is uploaded and its visibility is updated. The script is structured like so:
if(file_exists($output_file))
{
$conn->query("UPDATE `foo` SET `bar` = 1 WHERE `id` = ".$id." LIMIT 1");
apc_delete('feed:'.$id);
}
Everythi...
I'm working on a PHP script on a remote server-- apparently the caching is more than a bit too aggressive, since even after I change the code of the page, the result is the same when the page is called from a browser (I get an error about a command that I've totally commented out, and it's a simple page).
Is there a way to disable memca...
I'm trying to use APC (Alternative PHP Cache) on my localhost with wamp 2, PHP 5.3 and CodeIgniter 1.7.2, however If I turn on cache_by_default and enable apc.stat the server will crash and I get the following error:
[apc-error] Cannot redeclare class
ci_benchmark in
C:\wamp\www\k\mvc\codeigniter\Common.php
on line 127.
What ...
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).
...
I am looking for a copy php_apc.dll that was built with VC8. I found one built with VC9, but my PHP distro I got with the ZendServer CE says it needs to be built with VC8.
Any help would be greatly appreciated. Thanks,
Dave
...
Does anyone have a great system, or any ideas, for doing as the title says?
I want to switch production version of web app-- written in PHP and served by Apache-- from release 1234 to release 1235, but before that happens, have all files already in the opcode cache (APC). Then after the switch, remove the old cache entries for files fro...
I've the following function:
function Cache($key, $value = null, $ttl = 60)
{
if (isset($value) === true)
{
apc_store($key, $value, intval($ttl));
}
return apc_fetch($key);
}
And I'm testing it using the following code:
Cache('ktime', time(), 3); // Store
sleep(1);
var_dump(Cache('ktime') . '-' . time()); ec...
I have a LAMP stack with APC installed. I have a WordPress site on this server. Is WP taking advantage of the opcode caching? I have done no WP configurations. My understanding is that simply having APC installed means that all PHP code is being cached. If that is untrue, please point me to the direction where I can configure WP to take ...
More generally, does anyone know where the way APC works internally is documented?
...
Hi everyone,
I have started to try APC to store some specific data on each webserver as an complement to memcached.
However, the following code piece is giving me headaches:
echo apc_store('key', 'value');
echo apc_store('key', 'newvalue');
echo apc_fetch('key');
// Echoes: value
Memcached example:
$memcached = new Memcached;
$m...
Hi everybody,
I had some thoughts back ago about using memcached for session storage, but came to the conclusion that it wouldn't be sufficient in the event of one or more of the servers in the memcached pool were about to go down.
A hybrid version is to save the main database (mySQL) from load caused by reads would be to work out a f...
Hi,
I have an Apache/2.2.15 (VC9) and PHP/5.3.2 (VC9 thread safe) running as an apache module on Vista 64bit machine. All running fine.
Project that I'm benchmarking (with apache's ab utility) is basically standard Zend Framework project with no db connection involved. Average (median) apache response is about 0.15 seconds.
After I've...
Hello.
I have a slight problem and cannot for the life of me figure out what is happening. I am running a Linux machine on a server with APC enabled. Everything works fine.
Now when I enable APC on Windows the server starts terminating the connection. You know, the "Site currently unavailable" message Firefox spits out.
I tried the ac...
I have a PHP application using these components:
Apache 2.2.3-31 on Centos 5.4
PHP 5.2.10
Xdebug 2.0.5 with Remote Debugging enabled
APC 3.0.19
Doctrine ORM for PHP 1.2.1 using Query Caching and Results Caching via APC
MySQL 5.0.77 using Query Caching
I've noticed that when I start up Apache, I eventually end up 10 child processes. ...