PHP OPCode cache APC detailed introduction

WBOY
Release: 2016-07-29 08:43:53
Original
1148 people have browsed it

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.

 PHP OPCode缓存 APC详细介绍

APC control panel, the control file comes from APC-3.1.4.tgz

 PHP OPCode缓存 APC详细介绍

 PHP OPCode缓存 APC详细介绍

before cache is used

 PHP OPCode缓存 APC详细介绍

after cache is used

 PHP OPCode缓存 APC详细介绍

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.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!