Debian php 安裝 bcompiler

No Comments »

聽說 eAccelerator 在 php 5.1 之後就不能用了,除非要降到 5.0 以下,但偏偏現在都是 php 5.1 以上,如果想要編碼的話就必須要用 bcompiler,這個套件還需要用到 bzip2,這個bzip2 可不是一般的 bzip2 解壓縮程式,而是 libbz2-dev。

接下來就來安裝吧



apt-get install libbz2-dev

接著安裝 bcompiler,依照 http://www.php.net/manual/en/ref.bcompiler.php 上面所說的 Compiler 現在還只是實驗版,如果要裝的話後果自行負責喔!!
pecl install bcompiler 會出現錯誤訊息,提示著說這不是stable 版本,如果要裝的話就打下列指令(php5-dev or php-dev & php-pear or php5-pear 別忘記裝了)

pecl install channel://pecl.php.net/bcompiler-0.8
出現
downloading bcompiler-0.8.tgz …
Starting to download bcompiler-0.8.tgz (46,667 bytes)
………….done: 46,667 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
ERROR: `phpize’ failed
這樣阿~~~那我們就自己來編譯吧,預設 bcompiler-0.8.tgz 會放在 /tmp/pear/cache/bcompiler-0.8,自己去找找嚕
phpize
./configure
make
make install
將 extension=bcompiler.so 加到 php.ini 就好嚕
最後做個 phpinfo() 看看。

Post a Comment