Results 1 to 1 of 1
-
9th Feb 2012, 11:00 AM #1OPMemberWebsite's:
AVANETCO.COM AVAVPS.COMInstalling Alternative PHP Cache (APC) on Directadmin
A common optimization that can be done for php to improve performance is to install Alternative PHP Cache (APC).
What it does, is it caches php files in memory in their parsed and compiled state.
This removes the need for re-reading, parsing, and compiling for each request, thus greatly lowering your system load.
The cost of using this mosulde is increased memory usage, since that's where the cache lives.
Note - This won't work with suPhp, since each call to php is with a seperate binary call, and doesn't share the same memory. CLI is always running in memory, hence can shared the same memory, which is why it works.
1) To install it with the default CLI version of php, use the following:
PHP Code:
PHP Code:cd /usr/local/directadmin/custombuild
wget http://pecl.php.net/get/APC-3.1.9.tgz
tar xvzf APC-3.1.9.tgz
cd APC-3.1.9
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install
2) Then, we needed to edit the php.ini to add the code:
PHP Code:
PHP Code:extension=apc.so
apc.enabled=1
apc.shm_size=128M
apc.ttl=7200
apc.user_ttl=7200
apc.enable_cli=1
3) as well as change the php.ini line from:
PHP Code:
PHP Code:extension_dir = "./"
to be:
PHP Code:
PHP Code:extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
but, this may vary per system. The "make install" command will tell you where the apc.so was installed to (Installing shared extensions.
Note that this is a 3rd party module, and would be beyond our technical support for any issues that arise.
Note: It's been observed that with APC enabled, php may not install on the "make install" step. The error it produces is as follows:
PHP Code:
PHP Code:Fatal error: Class 'PEAR' not found in phar://install-pear-nozlib.phar/index.php on line 24
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2
After removing the APC options from the php.ini, it installed. The APC could be re-enabled.Albert.Nawaro Reviewed by Albert.Nawaro on . Installing Alternative PHP Cache (APC) on Directadmin A common optimization that can be done for php to improve performance is to install Alternative PHP Cache (APC). What it does, is it caches php files in memory in their parsed and compiled state. This removes the need for re-reading, parsing, and compiling for each request, thus greatly lowering your system load. The cost of using this mosulde is increased memory usage, since that's where the cache lives. Note - This won't work with suPhp, since each call to php is with a seperate binary Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Cache with my website on my PC.
By AJ Blacklisted in forum Technical Help Desk SupportReplies: 15Last Post: 8th May 2012, 10:02 AM -
wp super cache VS w3 total cache
By kokosko in forum Webmaster DiscussionReplies: 1Last Post: 21st Dec 2011, 07:44 PM -
Wp Super Cache
By skinner in forum Web Application/Script SupportReplies: 8Last Post: 25th Feb 2011, 07:02 PM -
[Wordpress] WP Super Cache or W3 Total Cache ?
By Rocke in forum Polling PlazaReplies: 13Last Post: 13th Dec 2010, 06:00 PM -
[Shared] [DirectAdmin] - Premium DirectAdmin Shared Hosting | Super Fast | ONLY $1.90/mth
By gfxguru in forum ArchiveReplies: 0Last Post: 29th Apr 2010, 09:59 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...