惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
C
Cisco Blogs
A
Arctic Wolf
月光博客
月光博客
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
量子位
小众软件
小众软件
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
N
Netflix TechBlog - Medium
K
Kaspersky official blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Y
Y Combinator Blog
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Schneier on Security
D
Docker
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
GbyAI
GbyAI
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
H
Help Net Security
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
B
Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家

博客园 - 房客

用JavaDoc生成项目文档 thymeleaf参考手册 转的一个Java基本功 杂记 修改Esxi克隆的CentOS的IP地址 CentOS搭建socket5代理服务器 CentOS上搭建Nginx + Mono 运行 asp.net 启动PPT的时候一直配置vs2013的问题解决 swift 元组 swift 集合类型(二) swift 集合类型(一) swift 定时器的使用 swift UIImage加载远程图片和圆角矩形 swift 随机生成背景颜色 VSFTPD配置TLS/SSL JayProxy的设置 CentOS 安装配置 PPTP VPN 服务器 - 房客 Nginx + fastcgi 处理php 编译安装php5.3.8(含php-fpm)
CentOS 安装eaccelerator PHP加速
房客 · 2011-12-21 · via 博客园 - 房客

1.编译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
出现了很多次这样的问题了,感觉都无从下手,总觉得与系统和php有关, 今天又出现了, 想来想去都觉得不奇怪, 后面开始重新编译php, php的扩展都没编译,发现设置open_basedir的时候,却没有出错^^^ , 从这个信息觉得有些可以利用的,把自己方案所需的扩展都安装进去,重启apache的时候,却发现有出现这个错误, 把php.ini中设置的扩展一个一个的关闭,开始排查,后面吧eaccelerator注释掉后,重启apache并没有出现错误, 定位问题出现eaccelerator, 在用google查了下,发现eaccelerator 0.9.6后的版本跟以前的有些改变,把open_basedir给限制了,这时我们要把限制去掉才行
下载eaccelerator 0.9.6后先不要安装,解包后找到eaccelerator.c这个文件,打开第1156行,这样的:
if (PG(open_basedir) && php_check_open_basedir(realname TSRMLS_CC)) {
修改成:
if (PG(open_basedir) && php_check_open_basedir(file_handle->filename TSRMLS_CC)) {
修改后在进行编译,就ok了

phpize
./configure
make

2.安装

make install
会将eaccelerator编译到目标路径

3.设置
拷贝eaccelerator.ini到 /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″