Installation and configuration notes for the PHP accelerator APC under Linux, Accelerator apc_php tutorial

Source: Internet
Author: User
Tags apc html form zts

Installation and configuration notes for the PHP accelerator APC under Linux, Accelerator APC


Currently I use APC-3.1.9 stable, can download the latest version of the Http://pecl.php.net/package/APC myself.

1. Installation

Copy the Code code 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--enable-apc-mmap--with-php-config=/usr/local/php/bin/php-config--PREFIX=/USR/LOCAL/APC
Make && make install

Note: After installing the compilation, check the appropriate directory:

Copy the Code code as follows:
ll/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
-rwxr-xr-x 1 root root 659164 Apr 8 18:30 apc.so

Installation is successful!

2, Configuration/usr/local/php/etc/php.ini

Copy the Code code as follows:
Vi/usr/local/php/etc/php.ini

Shift+g to the last line, add at the end

Copy the Code code 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 from the APC directory to the directory you can access.

Copy the Code code as follows:
cp/root/apc-3.1.9/apc.php/home/wwwroot/

3. Restart Lnmpa

Copy the Code code as follows:
/root/lnmpa restart

4. Attached: Installing the APC method under Windows

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

Copy the Code code as follows:
Extension = Php_apc.dll


HTML form submits data to PHP, and then PHP file is not executed, but instead prompts for download problem, Linux under Apache and PHP configuration problem

Causes many wrong reasons, need concrete analysis of specific problems
1. There is a problem with the MMCache module on the Linux x86-64
2. Due to a problem with the PHP compilation installation process, or after the apache+php installation is complete, PHP has been re-compiled and installed, and Apache also recompile this phenomenon. After you have recommended that you keep httpd.conf and related profiles, reinstall apache+php again, Note the sequencing, if you still have this prompt, please replace the PHP version of the reload.
3.php module zend_extension and extension conflict
4. As a result of the use of APC, this is a common problem with this type of Op-code cache optimization software. It is recommended to try the latest version (PECL.PHP.NET/PACKAGE/APC). Once present, only Apache can be re-established.
5./tmp directory file too many, after deletion of normal
6. Configure the mode as worker and change to Prefork
7. Conflict between ZendOptimizer-3.3.0 and jdk1.7.0
8. Web Access to certain special files caused by, check Access_log can see, delete files

Turn the. Explain a problem, that is, your Apache and PHP have a problem. Or you have a problem with PHP.
Try submitting to an empty PHP file to see if the error is not.
Just one in the php file.

Phpinfo ();
?>

How does an APC in php cache opcode? If I now have APC installed and configured to turn on APC cache in Phpini

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

http://www.bkjia.com/PHPjc/899058.html www.bkjia.com true http://www.bkjia.com/PHPjc/899058.html techarticle Linux PHP Accelerator installation and configuration notes, the accelerator APC currently I use APC-3.1.9 stable, you can download the latest version of the Http://pecl.php.net/package/APC. 1. Installation and re ...

  • 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.