Snow LeopardにbbPressをインストールした
Snow LeopardにbbPressをインストールしたので、その覚え書。今回のインストール環境は下記の通り。
- MacOS X/Snow Leopard (10.6.4)
- bbPress 1.0.2
- MySQL 5.1.49
- PHP 5.3.2
インストール
- 下記のサイトより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
- PHP 5.3以降の環境で発生する問題らしい。対応するチェンジセットは下記だ。
- 上記のコメントにあるように修正は既に入っているものの、ver.1.0.2には含まれていない。そこで下記のリポジトリから最新のtrunkのコードをダウンロードして再度インストールしてみた。
再インストール
- このまま使っても良いけれど、次のver.1.0.3*1がいつどのような形で出てくるのか分からないので、結局、元のbbpress-1.0.2.zipに戻して、.htaccessに下記を記載してエラーログの出力を抑制する方法で対処してしまった。ちょっと強引だけど、これならエラーログは出力されない。
php_flag display_errors Off