2008-05-01から1ヶ月間の記事一覧

Kohana で Hello, World!

CodeIgniter とは異なり、Controller の命名規約が異なる。 CodeIgniter はコントローラー名がクラス名になるが、Kohana の場合は Controller名 + _Conroller になる。 を application/controllers に hello.php として保存する。 そして、http://localhost…

Kohana の .htaccess について

CodeIgniter の .htaccess の設定と同様に Kohana でも行なう。 これを読んでから、Kohana の設定(Removing index.php From URLs)を読めば、英語がよくわからなくても理解できる。 Kohana のチュートリアルを参考にして、への直接アクセスを禁止することもで…

Kohana の application ディクレクトリと system ディレクトリ を Apache の DocumentRoot から外す

この作業を行うのは、セキュリティ上の理由から実施する。 Apache の DocumentRoot に Kohana の application や system ディレクトリがあるということは、不特定多数の人がそれらのディレクトリにアクセスできることを表す。このことは、例えばデータベース…

Kohana と CodeIgniter の違い

Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana | thislab.com - Web development and design by Fred Wu.の要約。 誤訳あり。 Kohana と CodeIgniter の簡単な比較 PHP のフレームワークで、CakePHP を使ってみた。しか…

Kohana ことはじめ 2

Make the application/logs directory writeable. Chmod to 666.application/logs ディレクトリを書き込み可能にするために、パーミッションを 666 に設定する。 Make the application/cache directory writeable if you use the cache library. Chmod to 66…

Kohana ことはじめ 1

CodeIgniter の設定ファイル application/config/config.php application/config/database.php Kohana の設定ファイル application/config/config.php system/config/database.php

Akelos を使い始めたけれど

約12時間ほど触ってみた印象として。 良かった点 ほぼ Ruby on Rails と同じ感覚でアプリケーションの作成ができる。 悪かった点 何かというと、すぐに Permission Denied が発生する。権限を緩くすれば、発生しないけれど、セキュリティ的に不安。Apache は…

Kohana ことはじめ 3

You should always try to create custom versions of the following files: * system/config/routes.php - set your $config['_default'] to your default controller * system/config/encryption.php - change the default $config['key'] * modules/auth/…

Akelos チュートリアル 4

Akelos チュートリアル 3 で設定した内容でテーブルを生成する。 成功すれば、下記のステータスが表示される。 % ./script/migrate Booklink install Upgrading----- (mysqlt): SET AUTOCOMMIT=0 ----- ----- (mysqlt): BEGIN ----- ----- (mysqlt): SHOW CO…

XAMPP で Akelos を開発する場合の備忘録

XAMPP の mysql.sock は、通常の /var/mysql/mysql.sock や /etc/mysql.sock に存在しない。 そのため、シンボリックリンクを生成し、設定ファイルを(わざわざ)書き換えなくても動作するようにする。 設定方法は Mac OS X のため、他の OS の場合は適宜読み…

Akelos チュートリアル 3

% ls -l booklink/app/installers/ total 16 -rw-r--r-- 1 littlebuddha littlebuddha 864 5 4 22:40 database_installer.php -rw-r--r-- 1 littlebuddha littlebuddha 601 5 4 22:40 framework_installer.php drwxr-xr-x 2 littlebuddha littlebuddha 68 5 …

Akelos で開発記 4

データベースを作成する。 % mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.0.51a Source distribution Type 'help;' or '\h' for help. Type '\c' to clea…

Akelos で開発記 3

myproject/config/config.php を設定する。 チュートリアルでは、ブラウザ上から config.php を生成していたが、既存の DEFAULT-config.php から設定をする。 % cd ~/works/myproject/trunk/config/ % cp DEFAULT-config.php config.php % vi config.php デ…

Akelos で開発記 3

次の画面が表示されたら、上記の設定は有効になっている。

Akelos で開発記 2

httpd.conf に Akelos へのパスを設定する。 % sudo vi /Applications/xampp/etc/httpd.conf XAMPP を利用していなければ、/etc/httpd/conf.d/ 下に myproject.conf を作成した方が管理がしやすいだろう。 Alias /myproject /home/littlebuddha/works/myproj…

Akelos で開発記 1

Akelos での開発を記してみる。 % mkdir -p ~/work/myproject % cd work/myproject % mkdir trunk branches tags % ssh -l littlebuddha www.example.com littlebuddha@www.example.com s password: % mkdir -p works/repos/myproject % svnadmin create /ho…

Akelos チュートリアル 2

データベース環境の設定を行う。 $ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 Server version: 5.0.51a Source distribution Type 'help;' or '\h' for help. Type '\c' …

Akelos チュートリアル 1

参照 : Akelos PHP Framework, Akelos PHPフレームワーク個人指導 アプリケーションをインストールして、httpd.conf を設定する。 % mkdir ~/booklink % cd ~/akelos/ % ./script/setup -d $HOME/booklink/ -p /home/littlebuddha/www/public_html/booklink …

Akelos をインストールする

% cd ~ % svn checkout http://svn.akelos.org/trunk/ akelos % ls -l akelos/ total 136 -rw-r--r-- 1 littlebuddha littlebuddha 10892 5 4 21:04 CHANGELOG.txt -rw-r--r-- 1 littlebuddha littlebuddha 24838 5 4 21:04 LICENCE.txt -rw-r--r-- 1 little…

phpMyAdmin を設定する

% mkdir ~/phpmyadmin % cd ~/phpmyadmin % wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.6-all-languages-utf-8-only.tar.bz2 % ls -l ~/phpmyadmin/ total 2200 -rw-r--r-- 1 littlebuddha littlebuddha 2246759 Apr 29 …

dag リポジトリを登録する

RPMForge の利用が推奨されているが、方法だけを記載。 # rpm --import ftp://ftp.riken.jp/Linux/dag/RPM-GPG-KEY.dag.txt # vi /etc/yum.repos.d/dag.repo # cat /etc/yum.repos.d/dag.repo [dag] name=Dag RPM Repository for RHEL5/CentOS5 baseurl=http…