ユーザ用ツール

サイト用ツール


cakephp:environment

文書の過去の版を表示しています。


ダウンロードから初期設定まで

ダウンロード

公式サイトダウンロードサイト(github)からダウンロードする。

# wget --no-check-certificate https://github.com/cakephp/cakephp/tarball/1.3.8

または

# curl -L -O https://github.com/cakephp/cakephp/tarball/1.3.8

展開

# tar zxvf cakephp-cakephp-1.3.8-0-g33afe21.tar.gz

設置

ドキュメントルートとcakeモジュールのディレクトリは別ける

vhosts
├ cake
│ ├ app・・・Appディレクトリ。
│ ├ cake・・・cakeモジュール。
├ htdocs
│ ├ webroot・・・Document Root。app/webrootをコピー。

index.php 編集

  • htdocs/webroot/index.php を編集
    39行目
-) define('ROOT', dirname(dirname(dirname(__FILE__))));
+) define('ROOT', dirname(dirname(dirname(__FILE__))) .DS .'cake');

46行目

-) define('APP_DIR', basename(dirname(dirname(__FILE__))));
+) define('APP_DIR', 'app');

tmpディレクトリのアクセス権設定

# chmod -R 707 cake/app/tmp

core.php の編集

  • Security.salt
    204行目
-) Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
+) Configure::write('Security.salt', '****************************************');
  • Security.cipherSeed
    209行目
-) Configure::write('Security.cipherSeed', '76859309657453542496749683645');
+) Configure::write('Security.cipherSeed', '11111111111111111111111111111');

database 設定ファイルの編集

  • サンプルファイルからコピー
cp cake/app/config/database.php.default cake/app/config/database.php
  • 設定ファイル編集
var $default = array(
	'driver' => 'mysql',
	'persistent' => false,
	'host' => 'localhost',
	'login' => 'user',
	'password' => 'password',
	'database' => 'database_name',
	'prefix' => '',
);

アクセスして確認

http://cakeserver.com/ 黄色い網掛けで警告が表示されていれば、適宜修正する。

cakephp/environment.1393399043.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)