一、关于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