What Is APC?
“APC” Stands for Alternative PHP Cache. The basic use of APC in your server is to speed up the interface of the website you own. When it's about PHP we all know that the basic need of PHP is to perform Dynamic Server Side Executions and Provide speed to the generation of results process. There are many kind of requests which gives the same result and you need them very often at your website. Its the time when the term APC comes into the game. The thing which APC does is that it saves your PHP Language's Operation Codes in Random Access Memory (RAM) and when the same request is made again and again it executes it from there and we all know that it will definitely speed up your website. Now you know the basics of APC and the thing that why it is used so it's the time to see how to install it for using.
Here are the steps to Install APC in LAMP.
1. Before Installing APC, Install useful packages by using “sudo apt-get install php-pear php5-dev make libpcre3-dev” command.
2. Use “sudo pecl install apc” command to install APC.
3. Run “sudo nano /etc/php5/apache2/php.ini” command
4. Add “extension = apc.so” at the bottom of the file "php.ini" and save it.
5. Restart the Apache Server by using “sudo service apache2 restart” command.
Now your APC is ready to use at LAMP server.
Here are the steps to Install APC in WAMP.
1. Make sure that you don't have "Zend" as you can not install both APC and Zend on a server.
2. Download the correct version of PHP for your windows.
3. Find php.ini file and open it in editor mode.
4. In the extensions section of this file add “extension = php_apc.dll”.
5. Customize some of the setting in APC.
6. Now restart your server.
Now your APC is ready to use at WAMP server.