Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

EDIT: i've reinstalled with Ubuntu server and it's not working as it should. Was never comfortable with Gentoo anyway ;)

I'm a Gentoo noob so please be gentle :)

I'm trying to install APC on a Gentoo (2006) based LAMP stack provided on a VPS by my host. I've run

emerge -av php5-dev/pecl-apc

to install it, and it appears to be compiled etc properly. EDIT: Here's the last several lines of the emerge:

I've added these lines to /usr/local/lib64/php5/php.ini:

apc.enabled = 1
apc.shm_size = 32

and restarted Apache (which restarts fine, suggesting okay config), but APC doesn't run. Can't see it in phpinfo() or using php -m.

EDIT: not sure if it matters, but the .so files are located in /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/, which seems a bit bizarre. Suhosin is in there too, but it's not running either.

Can anyone help? Much appreciated! :)

share|improve this question
Are you sure that you edited the correct php.ini file - sometimes there can be several of them. Try php -i | grep php.ini to see which one is active. – Xoundboy Oct 15 '11 at 10:41
Thanks for the response. It's the right one, that command gives /usr/local/lib64/php5/php.ini – melat0nin Oct 15 '11 at 10:44
Edit your post and append some last lines when emerging apc? Did you see in the extension directory? – quanta Oct 15 '11 at 10:54
How did you compile Apache and PHP? The normal path is /etc/php/apache2-php5.x/php.ini. – quanta Oct 15 '11 at 10:57
I didn't - it came preinstalled on the VPS. It's a Gentoo installation customised by the ISP - although to what extent it's different from a standard install I don't know. – melat0nin Oct 15 '11 at 10:59
up vote 1 down vote accepted


to php.ini did the trick!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.