even after installing APC in w3tc it says not installed

Posted November 14, 2014 2k views

im using ubuntu 14.04 apache
i’ve installed APC for my server but from w3tc it says not installed. i cant use any cache methods for vertual server. all opcode options are grayed out. only disk is enable.
here what i get from my info.php file

Opcode Caching Up and Running
Optimization Enabled
Startup OK

can anybody tell me whats the issue? i really appreciate your help.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Check the install section of the plugin, I has all the steps you need to complete to make it work.

PECL Alternative PHP Cache (APC) Installation (Recommended):
Time required: 1 minute

Install APC using the PECL command (and skip to #5 if successful):

pecl install apc

Or via compilation. Download the latest stable version and extract:

cd /usr/local/src && wget && tar -xzf APC-3.1.9.tgz && cd APC-3.1.9

Note the paths returned for the following commands:

whereis php-config

whereis apxs

Use the output from #2 to modify the –with-apxs and –with-php-config flags in the following compile command:

phpize && ./configure –enable-apc –enable-apc-mmap –with-apxs=/usr/sbin/apxs –with-php-config=/usr/bin/php-config && make && make install

The result should be similar to:
Installing shared extensions: /usr/lib/php/modules/
You can also use the apc.ini file we prepared for you:

cp /var/www/vhosts/ /etc/php.d/

Restart apache when ready:

/etc/init.d/httpd restart

You’re done! APC should now be available. If the following command retuns anything, you’re all set:

php -r ‘phpinfo();’ | grep 'apc’