Posted at September 22, 2016 at 5:53 pm by Jithin
APC stands for Alternative PHP cache. It is a PHP caching plugin. APC is a free open source opcode and it is a PECL module that can be loaded into PHP. PECL is a PHP Extension Community Library containing PHP extensions. PECL should be already in the cPanel servers along with the cPanel installation. APC is used to run PHP script executions more efficiently by cutting down on dynamic PHP executions and it provides a user cache for storing application data. APC is used to speedup PHP applications by caching both PHP code and user variables. It reduces server load and thereby improves the applications.
In PHP every time it requests for a page because it is a dynamic scripting language. For generating HTML code in the visitor’s web browser the server first parses the code in the PHP script. PHP is used for web pages that have content that is constantly updated. When you visit each time it will display a fresh copy of the page.
You need to re-run PHP scripts for data that might not have changed in the first place. APC allows to avoid repetition of PHP script executions, skipping the parsing and compiling steps. It stores the opcode that is executed each time the script is called again. APC is specific to PHP and it is used when local caching of objects in PHP scripts that are relatively small and frequently accessed. It is one of the most widely used PHP opcode caching solutions in use today. You can use APC on a VPS or dedicated server that is running PHP as either DSO or FastCGI.
1) Login to server via SSH.
2) Change the directory
3) Download the source code for APC and install it using wget.
4) Extract the files.
#tar -xf APC-3.1.13.tgz
5) Change tt the extracted folder.
6) Run the below command to configure APC in PHP.
7) Run the following commands
# make test
# make install
8) Add APC settings to the php.ini file
# vi /usr/local/lib/php.ini
apc.optimization = 0
apc.use_request_time = 1
9) Save the settings in php.ini file and restart Apache.
# /etc/init.d/httpd restart
If you need any further assistance please contact our support department.
You can skip to the end and leave a response. Pinging is currently not allowed.