background preloader

APC - Alternative PHP Cache (module drupal)

Facebook Twitter

Integrating APC (Alternative PHP Cache) Into PHP5 (Debian Etch & Apache2. Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Last edited 03/28/2008 This guide explains how to integrate APC (Alternative PHP Cache) into PHP5 on a Debian Etch system (with Apache2). APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and XCache. I do not issue any guarantee that this will work for you! 1 Preliminary Note I have tested this on a Debian Etch server with the IP address 192.168.0.100 where Apache2 and PHP5 are already installed and working. 2 Checking PHP5's Current State First, before we install APC, let's find out about our PHP5 installation. Vi /var/www/info.php Afterwards, we call that file in a browser: As you see, we have PHP 5.2.0 installed...

(JavaScript must be enabled in your browser to view the large image as an image overlay.) ... but APC isn't mentioned anywhere on the page: 3 Installing APC apt-get install php-pear. Displaying PHP APC Cache Information. Posted February 9th, 2008 in PHP APC is the Alternative PHP Cache, which is a free, open, and robust framework for caching and optimizing PHP intermediate code. I posted about how to install APC on Linux a couple of days ago, and will now look at the apc.php script which comes with APC and shows information about how much of the cache is being used, what files are being cached, the number of times they've been accessed etc. When you download and install the APC cache, there's a file in the root level of the source archive called apc.php - this is a PHP script which allows you to view information about the status of the PHP Cache as shown in the screenshots below.

You simply need to copy the apc.php file to a directory that is served by your Apache (or other) web server and then load up the page in your browser. The first screenshot of the APC monitor below shows host statistics. The sceond screenshot below shows the page when clicking the "System Cache Entries" button. APC. Installing the Alternative PHP Cache (APC) Posted by tuoermin on Fri 11 Jan 2008 at 12:56 The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code. It's an PECL extension which shares the packaging and distribution system with its sister, PEAR. Provided that you have PEAR (php5-pear) package installed on your system, the procedure is as simple as pecl install apc. Alternatives. meglohvat:# pecl install apc downloading APC-3.0.16.tgz ... As probably corectly guessed by PECL package managers, you are runing an Apache web server so you should confirm by typing yes or hitting Enter key. Errors which you may (I did) encounter checking for re2c... no configure: WARNING: You will need re2c 0.9.11 or later if you want to \ regenerate PHP parsers.

The re2c package was missing on my system ›› apt-get install re2c. checking for gawk... no checking for nawk... nawk checking if nawk is broken... no checking whether apc needs to get compiler flags from apxs... Setting up APC apc.shm_size. Installation. APC. Disclaimer: i do not guarantee it will work for you so you better use it at your own risk. It works for me. * I am using # symbol for all shell commands I am posting a quick step-by-step guide to install APC on servers (dedicated or VPS) with cpanel/whm working. First login as a root to your server/vps and make a directory to work with this plugin, #mkdir /home/APC-php #cd /home/APC-php now here we will first download the APC with following command #wget you can check for the latest version now you can use gzip and tar separately or tar -xzvf to unzip this file #tar -xzvf APC-3.0.14.tgz now you will have a APC-3.0.14 folder.

#cd APC-3.0.14 now you have to make php configuration files by following command #phpize after this use following three commands # . #make #make test #make install NOTE: if you are using suPHP then skip --with-apxs *one more thing, if you use check your php.ini location by #php -i | grep php.ini then open it with your favorite editor. mine was at. APC - Alternative PHP Cache. The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. Besides a opcode cache it provides a user cache for storing application data. This module uses the APC user cache as a cache backend for Drupal.

Use APC for caches that do not change often and will not grow too big to avoid fragmentation. Drupal 6 The APC backend can be run for drupal 6 using cache backport. Maintainers Drupal 7: R.Muilwijk (sponsored by Trinoco)Drupal 5&6: Slantview Installation instructions.