LoginSignup
6
5

More than 5 years have passed since last update.

【Ethna】Ethna 2.6beta4環境構築手順【バグ修正手順】

Last updated at Posted at 2016-02-07

Ethna2.6Beta4なのですが重大なバグがありまして、プロジェクト一式作っただけではそのまま動きません。今回はバグ修正も含めた構築手順を書いていきます。
※ethna公式ページには2.6beta4が最新になっておりますがgithubには2.7.x-devまで公開されております。
https://github.com/ethna/ethna

動作させてみた環境

  • Vagrant+Virtualbox上のCentOS6.6
  • PHP 5.3.3

他の環境でも大体いっしょだと思います。

Ethnaをインストール

まずはPEARコマンドを使ってインストールしていきます。

pearインストール

yum install php pear

pearでチャンネル登録

pear channel-discover pear.ethna.jp

※もしchanel-discoverに失敗したら

pear upgrade pear

pearからethna2.6beta4インストール

pear install -a  ethna/ethna-beta

※ -aオプションは依存ライブラリである Smarty や simpletest なども同時にインストールされます。

インストール確認

ethna -v

これでethna add-projectコマンドでファイル一式作れるようになりました。
あとは公式チュートリアルでも
http://ethna.jp/doc/tutorial/01-setup.html

Ethna 2.6betaのバグ修正

ここからが重大なのですがそのまま開こうとするとこのようなWarningメッセージがでてくるかと思います。

Ethnatest[2312](ERR): global.smarty_core_write_compiled_resource(/usr/share/pear/Smarty/Smarty.class.php:1431): [PHP] E_USER_ERROR: Smarty error: unable to write to $compile_dir '/var/www/html/ethnatest/tmp'. Be sure $compile_dir is writable by the web server user. in /usr/share/pear/Smarty/Smarty.class.php on line 1093
Ethnatest[2312](WARNING): Smarty.fetch(/usr/share/pear/Smarty/Smarty.class.php:1256): [PHP] E_WARNING: include(/var/www/html/ethnatest/tmp/3c0e62695692011e44a222aa5aefa07f^%%82^823^823B39A1%%layout.tpl.php): failed to open stream: No such file or directory in /usr/share/pear/Smarty/Smarty.class.php on line 1256
Ethnatest[2312](WARNING): Smarty.fetch(/usr/share/pear/Smarty/Smarty.class.php:1256): [PHP] E_WARNING: include(): Failed opening '/var/www/html/ethnatest/tmp/3c0e62695692011e44a222aa5aefa07f^%%82^823^823B39A1%%layout.tpl.php' for inclusion (include_path='/var/www/html/ethnatest/app:/var/www/html/ethnatest/lib:.:/usr/share/pear:/usr/share/php') in /usr/share/pear/Smarty/Smarty.class.php on line 1256

ethna本体のバグなのでこれを修正していきます。

cd /usr/share/pear/Ethna/class/DB
vi PEAR.php

517行目を
protected _query($query)

protected function _query($query)

に変更する

これでEthnaが正常動作するようになりましたとさ。

6
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5