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 ″