Snow LeopardにbbPressをインストールした

Snow LeopardにbbPressをインストールしたので、その覚え書。今回のインストール環境は下記の通り。

MySQL, PHP

インストール

  • 下記のサイトよりbbpress-1.0.2.zipをダウンロードして展開する。
  • MySQLにデータベースを作成する。
mysql> create database bbpress;
mysql> grant all privileges on bbpress.* to 'bbpuser'@'localhost' identified by 'password';
  • 下記のurlにアクセスすると初期設定画面が表示されるので、上記で設定したデータベースアクセス用のパスワード等を入力する。
  • これで画面は表示されて無事に使えるようになったのだけど、ページを表示する毎に下記のエラーログが出力されてしまう。
[Wed Aug 25 16:48:13 2010] [error] [client ::1] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /Library/WebServer/Documents/bbpress/bb-settings.php on line 186, referer: http://localhost/bbpress/
[Wed Aug 25 16:48:13 2010] [error] [client ::1] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /Library/WebServer/Documents/bbpress/bb-includes/backpress/functions.wp-object-cache.php on line 108, referer: http://localhost/bbpress/
[Wed Aug 25 16:48:13 2010] [error] [client ::1] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /Library/WebServer/Documents/bbpress/bb-includes/backpress/pomo/mo.php on line 171, referer: http://localhost/bbpress/
[Wed Aug 25 16:48:13 2010] [error] [client ::1] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /Library/WebServer/Documents/bbpress/bb-includes/functions.bb-l10n.php on line 484, referer: http://localhost/bbpress/
[Wed Aug 25 16:48:13 2010] [error] [client ::1] PHP Deprecated:  Assigning the return value of new by reference is deprecated in /Library/WebServer/Documents/bbpress/bb-includes/backpress/class.wp-taxonomy.php on line 581, referer: http://localhost/bbpress/
  • MacOS X環境ではコンソールに出てくるだけなのでまだ使えるけれど、同じ様にWindows XPへインストールしてみたらこちらは各ページにエラーログが表示されてしまい使い物にならない。
Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bbpress\bb-settings.php on line 186
Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bbpress\bb-includes\backpress\functions.wp-object-cache.php on line 108
Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bbpress\bb-includes\backpress\pomo\mo.php on line 171
Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bbpress\bb-includes\functions.bb-l10n.php on line 484
Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bbpress\bb-includes\backpress\class.wp-taxonomy.php on line 581
  • 上記のコメントからのリンクを辿った下記のブログに問題点と修正状況が記載されていた。

I looked into the matter and found out that due to some change in PHP 5.3 these errors were not letting bbPress work normally. Matt fixed it in changeset 2383 but it is not available in bbPress 1.0.2 and is only available in Trunk version. That’s the reason bbPress 1.0.2 will give error for localhost software or webserver which runs PHP 5.3 or later.

Fix bbPress installation problem
  • 上記のコメントにあるように修正は既に入っているものの、ver.1.0.2には含まれていない。そこで下記のリポジトリから最新のtrunkのコードをダウンロードして再度インストールしてみた。
  • ここで、フォルダ"bb-includes/backpress"が無いというエラーが出たので、元のbbpress-1.0.2.zipから取り出してコピーした。
  • ページを表示させてみると、データベースの更新を行う旨の表示が出た後、今度は正常に画面が表示された。MacOS XWindows環境の両方でエラーログが表示されないことを確認した。(但し、管理画面にはなぜか"bbPress 1.1-alpha-2530"と表示されている)

再インストール

  • このまま使っても良いけれど、次のver.1.0.3*1がいつどのような形で出てくるのか分からないので、結局、元のbbpress-1.0.2.zipに戻して、.htaccessに下記を記載してエラーログの出力を抑制する方法で対処してしまった。ちょっと強引だけど、これならエラーログは出力されない。
php_flag  display_errors Off

PHPのメール設定

  • 新規に登録したユーザにはメールでパスワードが送付されるので、ネットで公開する場合はもちろん社内で使う場合にも、PHPにメールサーバの設定が必要となる。(/etc/php.iniへ追記)

日本語化

  • 日本語リソースは下記にあるので、my-languagesフォルダを作って”ja.mo”, "ja.po"の両方を放り込んでおく。
  • インストール時に言語を選択する箇所はあるが、インストール後に言語を切り替えるGUIは無いようだ。変更が場合には、bb-config.phpを開いて下記の設定を書き換えればよい。
define( 'BB_LANG', 'ja' );

掲示板としての使い勝手は良好。様々なところで使われているので、実は知らずに使っていたケースが多いかも知れない。(私もその1人です)



関連