Linux Mint + How To Install APC And Configure APC On Xampp – APC caching extension

[contentblock id=300squaretextlink] [contentblock id=300squareimagelink]

To install APC (APC caching extension) for Xampp on your Linux Mint or Ubuntu distro, just follow the steps below:

  1. # cd apc (to your apc folder you just extracted)
  2. # sudo /opt/lampp/bin/phpize
  3. # ./configure –enable-apc –with-apxs –with-php-config=/opt/lampp/bin/php-config
  4. # make
  5. # sudo make install
  6. Next Step is to edit you php.ini and add the apc extension as

How To Configure APC In php.ini ?

I have been pretty comfortable with the following APC Settings so far with version PHP 5.3.2+ (I haven’t tested with lower PHP version)

In your php.ini, just add the following block:
=> There should be only one line of
=> So either delete the one you added above, or remove the one in the block below.. your choice, but I prefer the one below, to keep things grouped by modules/extensions

apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 32M
apc.optimization = 0
apc.num_files_hint = 512
apc.user_entries_hint = 1024
apc.ttl = 0
apc.user_ttl = 0
apc.gc_ttl = 600
apc.cache_by_default = 0
apc.filters = “apc\.php$”
apc.slam_defense = 0
apc.use_request_time = 1
apc.mmap_file_mask = /tmp/apc.XXXXXX
apc.file_update_protection = 2
apc.enable_cli = 0
apc.max_file_size = 2M
apc.stat = 0
apc.write_lock = 1
apc.report_autofilter = 0
apc.include_once_override = 0
apc.rfc1867 = 0
apc.rfc1867_prefix = “upload_”
apc.rfc1867_name = “APC_UPLOAD_PROGRESS”
apc.rfc1867_freq = 0
apc.localcache = 1
apc.localcache.size = 512
apc.coredump_unmap = 0
apc.stat_ctime = 0

Possible Errors During Execution Of phpize

5 Comment(s)

  1. Hi Ken,
    thanks for your comment.

    By cd apc I mean to change your directory to APC. That is go to your APC folder.

    I don’t know how more simpler I can explain that :S But if you still have confusion, let me know what is not clear. I will then see how I can clarify it better.


  2. Hi, I can’t get it work, I tried to install APC 3.1.9 (latest stable version) but when I ran phpize it showed some warnings like config.m4:180: warning: AC_CACHE_VAL(PHP_APC_GCC_ATOMICS, …): suspicious cache-id, must contain _cv_ to be cached
    When I continued with ./configure it said:
    configure: WARNING: you should use –build, –host, –target
    configure: WARNING: invalid host type: –enable-apc
    configure: WARNING: you should use –build, –host, –target
    configure: WARNING: invalid host type: –with-apxs
    configure: error: invalid variable name: `–with-php-config’

    Any thought?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.