Go Back   Cloud Computing > Support > PHP Forum
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-25-11, 02:59
BOD Member
 
Join Date: May 2010
Posts: 2
Default What is PHP APC ?

APC is a Alternative PHP Cache which is a caching solution for PHP.

How APC works ?

APC reads your PHP files, parses them into a more efficient binary format and then caches them in memory so that each request for your PHP files and PHP library files can be fed from the parsed cache. This will generally lead to a speed increase when serving a PHP site, especially one with a lot of library files.

Installing APC

1) ssh the server with root user and download apc package.

HTML Code:
# cd /usr/local/src
# wget http://pecl.php.net/get/APC-3.1.6.tgz
2) Unpack the version and change to the APC directory

HTML Code:
# tar -zxf APC-3.1.6.tgz
# cd APC-3.1.6.tgz
3) Create configuration files and search for the “php-config” file since you will need to configure APC with it.

HTML Code:
# phpize
# which php-config
4) Now, configure APC

HTML Code:
./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/local/bin/php-config
5) Create the installation files and install APC

HTML Code:
# make
# make install
Now AP installation is completed. Last step is to ad apc extension to php.ini file

6) search for php.ini file

HTML Code:
# php -i | grep php.ini
7) Adding extension

HTML Code:
extension="apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=256
apc.ttl=3600
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXx
apc.enable_cli=1

8) Save the file and restart apache service.

HTML Code:
#/etc/init.d/httpd restart
9) Now you should see apc extension available under phpinfo.

That'a ALL
__________________
Regards,
Brent
Support Team
Reply With Quote
  #2 (permalink)  
Old 05-25-11, 05:27
BOD Member
 
Join Date: Apr 2011
Posts: 76
Default



I guess there are few other alternatives also available such as:
  • ionCube PHP Accelerator
  • Turck MMCache
  • XCache
  • Nusphere PhpExpress
  • Zend Platform
  • Zend Optimizer
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 01:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.