網頁

2006年5月10日 星期三

eaccelerator + php5

剛剛在弄 mediawiki 才發現原來我家的 eaccelerator 根本一直都沒跑阿,花了一些時間看到底問題出在哪裡,發現原來是被擺到了。再安裝厚的提示訊息寫著:
*****************************************************************************

You have installed the eaccelerator package.

Edit %%LOCALBASE%%/etc/php.ini and add:

zend_extension="%%PREFIX%%/lib/php/%%PHP_EXT_DIR%%/eaccelerator.so"

Then create the cache directory:

mkdir /tmp/eaccelerator
chown www /tmp/eaccelerator
chmod 0700 /tmp/eaccelerator

*****************************************************************************

但是實際上如果去 /usr/local/etc/php.ini 設 zend_extension 事實上他會不理你。所以還是得設到 /usr/local/etc/php/extensions.ini 裡面去:
extension=eaccelerator.so 

本來是直接 copy/paste 他的路徑,結果 php -v 下去就又被 ooxx 。所以現在看起來,是真的有跑了:
PHP 5.1.4 (cli) (built: May  9 2006 10:48:26)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

被 ports 的 hint message 擺道,很無言的阿!

PS. 前幾天  FreeBSD 的 php 好像地震了一下:
20060506:
  AFFECTS: users of PHP
  AUTHOR: ale@FreeBSD.org

  The old PHP slave ports (phpN-cli, phpN-cgi and mod_phpN) were removed
  in favour of unified PHP ports that allow building any combination of
  PHP SAPIs (cli, cgi and apache module).
  The PHP CGI binary was renamed to php-cgi, so you should update
  the path in your script. To simplify the update process, *only* for
  this release a 'php' compatibility symlink to php-cgi will be created
  if you don't select the CLI SAPI.
  Before the upgrade you *should* run 'make config' in lang/php4 or
  lang/php5 to configure the SAPIs you want to install.
  As a consequence the default binary packages include the CLI and the
  FastCGI SAPIs.
 

所以順手把他重新 make 了一次,進 php 打 make config 勾一勾然後 portupgrade -f 'php*' 下去就搞定了 :p