PHP中使用eAccelerator

一、关于eAccelerator对php版本的支持

eAccelerator对php5.5前的版本可以很好的支持,5.5之后的版本无法编译通过

会报这个错误 eaccelerator.c:66:23: fatal error: php_logos.h: No such file or directory

这个eaccelerator的github上一个讨论 https://github.com/eaccelerator/eaccelerator/issues/33

看github上的更新,实际上eaccelerator已经很久未更新了

二、在php5.5(包括5.5)前版本的安装,我用了xampp

1、到下载https://github.com/eaccelerator/eaccelerator 下载源码包

2、tar  -zxvf eaccelerator-eaccelerator-42067ac.tar.gz
3、cd eaccelerator-eaccelerator-42067ac

4、./configure --enable-eaccelerator=shared --with-php-config=/opt/lampp/bin/php-config

若提示 Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

则安装一下autoconf

5、make&make install

6、编辑/opt/lampp/etc/php.ini

; disabled in XAMPP 1.7.2 because incompatible with PHP 5.3.0
extension="eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/opt/lampp/temp/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"
实际上这里就提示了XAMPP 1.7.2 后不在使用eaccelerator

三、使用 Opcache

PHP5.5已经集成了Opcache,性能还不错。

可以很方便使用

xampp中 开启一下就可以了

zend_extension=opcache.so

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值