Installation and configuration notes of PHP accelerator APC in Linux, accelerator apc_PHP tutorial

Source: Internet
Author: User
Tags apc zts
Installation and configuration notes of the PHP accelerator APC in Linux, and the accelerator apc. Linux PHP accelerator APC installation and configuration notes, accelerator apc currently I am using APC-3.1.9stable, you can go to pecl. php. netpackageAPC to download the latest version. 1. installation and configuration notes of the PHP accelerator APC in the Linux environment, and the accelerator apc

Currently I am using the APC-3.1.9 stable, you can download the latest version from the http://pecl.php.net/package/APC.

1. Installation

The code is as follows:


Wget http://pecl.php.net/get/APC-3.1.9.tgz
Tar xzvf APC-3.1.9.tgz
Cd APC-3.1.9
/Usr/local/php/bin/phpize
. /Configure -- enable-apc-mmap -- with-php-config =/usr/local/php/bin/php-config -- prefix =/usr/local/apc
Make & make install

Note: Check the corresponding directory after installing and compiling:

The code is as follows:


Ll/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
-Rwxr-xr-x 1 root 659164 Apr 8 apc. so

Installed successfully!

2. configure/usr/local/php/etc/php. ini.

The code is as follows:


Vi/usr/local/php/etc/php. ini

Shift + g to the last row and add at the end

The code is as follows:


[Apc]
Extension = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/apc. so"
Apc. enabled = 1
Apc. cache_by_default = on
Apc. shm_segments = 1
Apc. shm_size = 64
Apc. ttl = 7200
Apc. user_ttl = 7200
Apc. num_files_hint = 0
Apc. write_lock = On

Then copy the APC. php file under the apc directory to the accessible directory.

The code is as follows:


Cp/root/APC-3.1.9/apc. php/home/wwwroot/

3. restart LNMPA

The code is as follows:


/Root/lnmpa restart

4. Appendix: install apc in Windows

: Http://kromann.info/php5_2-Release_TS/php_apc.dll

The code is as follows:


Extension = php_apc.dll


The html form submits data to php. the php file is not executed, but the download is Prompted. apache and php configuration problems in linux

There are many causes of errors. you need to analyze the specific problems.
1. problems with linux x86-64 using the mmcache module
2. due to a problem in the php compilation and installation process, or after apache + php is installed, PHP has been re-compiled and installed. apache also re-compiled. we recommend that you retain httpd. after conf and related configuration files, reinstall apache + PHP again. pay attention to the sequence. if this prompt is still displayed, replace the php version and reinstall it.
3. php module zend_extension conflicts with extension
4. this is a common problem with op-code cache optimization software because APC is used. we recommend that you use the latest version (pecl.php.net/package/APC). apache can only be restarted once it appears.
5. the/tmp directory contains too many files, which is normal after deletion
6. change the configuration mode to worker and prefork.
7. conflict between ZendOptimizer-3.3.0 and jdk1.7.0
8. some special files accessed by the web. check access_log to see that the file is deleted.

. The problem is that your apache and php are faulty. Or your php has a problem.
Try to submit the php file to an empty file.
Only one php file is written.

Phpinfo ();
?>

How does apc in php Cache opcode? Assume that I have installed apc and configured enable apc cache in phpini.

$ Memcache = new Memcache;
$ Memcache-> pconnect ("127.0.0.1", 11211 );

Currently I am using the APC-3.1.9 stable, you can go to the http://pecl.php.net/package/APC to download the latest version. 1. install again...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.