Install eaccelerator PHP acceleration on centos

Source: Internet
Author: User

1. Compile eaccelerator

Warning: Unknown: open_basedir restriction in effect. File () is not within the allowed path (s): (.:/tmp/) in unknown on line 0
Fatal error: Can't load/XX/index. php, open_basedir restriction. In unknown on line 0
There have been many such problems, and I feel like I have no way to start. I always think it is related to the system and PHP. Today I have appeared again. It is not surprising to think about it. I will re-compile PHP later, PHP extensions have not been compiled, and no error occurred when setting open_basedir ^. From this information, I think some of them can be used to install all the extensions required by my solution, when I restarted Apache, I found this error. the extensions set in ini are closed one by one and start troubleshooting. After the eaccelerator is commented out, there is no error after Apache is restarted. If the problem is located, the eaccelerator is located and checked by Google, we found that the version 0.9.6 of the eaccelerator has changed somewhat from the previous one. We have restricted open_basedir. In this case, we need to remove the restriction.
Do not install the eaccelerator 0.9.6 after downloading it. unpackage the eaccelerator and find the eaccelerator. c file. Open row 1,156th, as shown in the following figure:
If (PG (open_basedir) & php_check_open_basedir (realname tsrmls_cc )){
Modify:
If (PG (open_basedir) & php_check_open_basedir (file_handle-> filename tsrmls_cc )){
After the modification, it will be OK after compilation.

Phpize
./Configure
Make

2. Installation

Make install
The eaccelerator is compiled to the target path.

3. Set
Copy eaccelerator. ini to/etc/PHP. d/eaccelerator. ini

Extension = "eaccelerator. So"
Eaccelerator. shm_size = "16 ″
Eaccelerator. cache_dir = "/tmp/eaccelerator"
Eaccelerator. Enable = "1 ″
Eaccelerator. optimizer = "1 ″
Eaccelerator. check_mtime = "1 ″
Eaccelerator. DEBUG = "0 ″
Eaccelerator. Filter = ""
Eaccelerator. shm_max = "0 ″
Eaccelerator. shm_ttl = "0 ″
Eaccelerator. shm_prune_period = "0 ″
Eaccelerator. shm_only = "0 ″
Eaccelerator. Compress = "1 ″
Eaccelerator. compress_level = "9 ″

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.