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: http://pastebin.com/MMjtjhrz

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

[apc]
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! :)

link|improve this question

50% accept rate
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 apc.so in the extension directory? – quanta Oct 15 '11 at 10:54
1  
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
show 7 more comments
feedback

1 Answer

up vote 1 down vote accepted

Adding

extension=apc.so

to php.ini did the trick!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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