Compiling and using APC on VPS?



hello –

has anyone successfully compiled APC for a VPS on DH? I was able to compile 3.1.9 (stable) and 3.1.13 (beta for PHP5.4), but when i do a make test, they both fail in some cases (the older less so than the new beta).

however, when install the extension via phprc and check performance via apc.php i can tell that the uptime is very low, usually in the area of minutes (<10 in general). now i am not sure if this is due to the PHP54.cgi process ending at some point (should it) or due to a faulty binary i compiled.

has anyone had successes with APC so far?

thanks in advance.


The APC tests all run using the interpreter named “php”. On our servers, this is always PHP 5.2 (for backwards compatibility… grumble), so trying to run the tests with a copy of APC that was built for PHP 5.3 or 5.4 will definitely fail. Unless you’re working on changes to APC itself, you probably don’t need to run these tests.

The uptime results you’re seeing are normal. mod_fcgid automatically shuts down FastCGI processes (including PHP interpreters) which haven’t been used recently.


thank you for clarifying this and i will assume that it compiled properly then, since no warnings or errors come up unless i run the tests. in fact, i can see a much improved performance.

is there a way around this by extending this time through some configuration, or is this by definition that FastCGI will just not be a persistent process and therefore APC will just get killed?

on a somewhat related note, is it possible to use apt-get to install php5-dev and use pecl? or should that level of changes to the system be avoided (if it is even possible).

thank you again your response, very helpful.