[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:
- # cd apc (to your apc folder you just extracted)
- # sudo /opt/lampp/bin/phpize
- # ./configure –enable-apc –with-apxs –with-php-config=/opt/lampp/bin/php-config
- # make
- # sudo make install
- Next Step is to edit you php.ini and add the apc extension as follows:extension=apc.so
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:
NOTE:
=> There should be only one line of extension=apc.so
=> 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]
extension=apc.so
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
not sure what you mean by
1.# cd apc (to your apc folder you just extracted)
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.
Thanks,
//Wasseem
Hey great, it’s works
thank’s to post the “Possible Errors”
cause i catch them in my machine
Hi Aditya,
thanks for your comment, glad I have been helpful 🙂
//Wasseem
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?