PHP中使用eAccelerator

來源:互聯網
上載者:User

一、關於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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.