Introduction to APC
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
APC official website: http:/ /www.php.net/manual/en/book.apc.php
Download address of the latest version under WIN: http://downloads.php.net/pierre/
Download link: http://downloads.php.net /pierre/php_apc-3.1.4-5.3-VC6-x86.zip Use the corresponding DLL according to your own PHP compiled version
APC configuration
APC configuration mainly explains the configuration under WIN, there are many online articles about configuration under Linux
1. Download php_apc.dll to the ext directory of PHP
2. Modify php.ini and add extension=php_apc.dll
Add configuration items at the end of php.ini
; APC Setting
[APC]
; Turning on stat will report an error
;apc.stat=0
apc.enabled=”1″
apc.shm_segments=”1″
;The problem here is that the default memory configuration has been modified and an error occurred under WIN7. I wonder if you have encountered it?
;apc. shm_size=”128″
; apc.ttl=7200
; apc.user_ttl=7200
; Correction parameters
apc.ttl=”300″
apc.user_ttl=”300″
apc.num_files_hint=”1024″
apc. mmap_file_mask=”E:/Wamp/tmp/apc.XXXXXX”
apc.enable_cli=”1″
3. Restart the apache server and check if there is an apc configuration item in phpinfo. If so, the configuration is successful.
APC control panel, the control file comes from APC-3.1.4.tgz
before cache is used
after cache is used
FAQ:
1.at Cache clearing problem of OPCode under fcgi?
The above has introduced the detailed introduction of PHP OPCode cache APC, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.