APC

From DreamHost
Jump to: navigation, search

APC is a PHP cache. It will work under both shared and PS environments, but we recommend that you use DreamHost PS (testing on DreamHost PS with a semi-large MediaWiki install increased php's resource usage to 55M).

The instructions provided in this article or section are considered advanced.

You are expected to be knowledgeable in the UNIX shell.
Support for these instructions is not available from DreamHost tech support.
Server changes may cause this to break. Be prepared to troubleshoot this yourself if this happens.
We seriously aren't kidding about this.

Installing

  1. Grab the source code: wget http://pecl.php.net/get/APC-3.1.6.tgz
  2. Run phpize (PHP 5.3 domains: /usr/local/php53/bin/phpize)
  3. ./configure; make (for PHP 5.3 domains: ./configure --with-php-config=/usr/local/php53/bin/php-config; make)
  4. Copy modules/apc.so from the APC directory somewhere else.
  5. Setup a custom PHP.ini.
  6. Add the line extension = /home/YOURUSER/WHERE/APC/IS/apc.so to the custom php.ini.
  7. killall php5.cgi; killall php53.cgi if you need to kill PHP
  8. APC is now installed and available for use. (To check, create a php file that calls phpinfo();, visit the file, and check for "apc".)
Personal tools