Notes on installing Alternative PHP Cache (APC):
-
Download and istall:
$ wget http://pecl.php.net/get/APC-3. 0.14.tgz
$ tar -xvzf APC-3.0.14.tgz
$ cd APC-3.0.14
$ phpize
$ ./configure --enable-apc
$ make
# make install
extension=/path/to/apc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XX XXXX
apc.enable_cli=1
# service httpd restart
Copy the "apc.php" admin file in the source directory to a password protected web site directory. Edit "apc.php" top line to change password to something different from default.
Related Links:
- sandip's blog
- Login or register to post comments
Comments
I just go through given instruction but phpinfo() doesn't showing me APC installed. I added extension=/path/to/apc.so XXXX
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XX
apc.enable_cli=1
this lines at the end of the php.ini is i am correct? Give me solution
Did you replace "/path/to/apc.so" with the actual path to the "apc.so" lib file? Alternately, you could just use "extension=apc.so".
pcre-devel package is required on CentOS
APC and Zend Optimizer does not play well together. Apache crashes with segmentation fault trying to allocated huge amounts of memory.
eAccelerator and Zend Optimizer are compatible.
bash: phpize: command not found
I get this error following your guide (Ubuntu Dapper Drake Server)
You will need to install the dev package for php.