Since OPCaching options are becoming more mainstream and less experimental these days, I figured why not write a little how to. As with everything, this too has a few caveats.
On to the instructions.
I don’t use pecl often. I’ve had issues with it disrupting other installed modules, failing because /tmp is mounted as noexec and multiple other issues, so I’ll go from source here.
cd /usr/local/src wget http://pecl.php.net/get/APC-3.1.9.tgz tar -zxvf APC-3.1.9.tgz cd APC* phpize ./configure make make install
At this point the extension is ready to use, but you need to tell PHP to use it. Alter your php.ini at /usr/local/lib/php.ini. Go all the way to the bottom and add
Next, will be settings. Since I don’t know you’re environment, I can’t give you an end-all-be-all configuration. You need to adjust settings best for your system. To get started, copy the apc.php file from the contents which you just extracted to one of the accounts public_html’s and view it in browser. You can see all of the settings and also the variables which can be adjusted.