一、關於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.0extension="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