{"id":3495,"date":"2017-03-28T18:28:36","date_gmt":"2017-03-28T09:28:36","guid":{"rendered":"http:\/\/www.searchlight8.com\/?p=3495"},"modified":"2017-03-28T18:28:36","modified_gmt":"2017-03-28T09:28:36","slug":"cakephp2-install","status":"publish","type":"post","link":"https:\/\/www.searchlight8.com\/wp-searchlight8\/cakephp2-install\/","title":{"rendered":"[CakePHP] CakePHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u5404\u7a2e\u8a2d\u5b9a"},"content":{"rendered":"<p>CakePHP2\u3092Linux\u30b5\u30fc\u30d0\u30fc\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n<h3>CakePHP\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u6982\u8981<\/h3>\n<p>CentOS:7.3<br \/>\nCakePHP:2.6.7<br \/>\nApache\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u304c\u4f5c\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u306b\u3057\u307e\u3059\u3002<br \/>\nhttp:\/\/www.example.com\/test<br \/>\nhttp:\/\/www.example.com\/sample<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306f<br \/>\n\/var\/www\/html\/test<br \/>\n\/var\/www\/html\/sample<br \/>\n\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>CakePHP2\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u2192\u89e3\u51cd\u3057\u3066\u305d\u306e\u307e\u307e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u4f7f\u3046\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u826f\u3044\u3068\u306f\u8a00\u3048\u307e\u305b\u3093\u3002\u4eca\u56de\u306fCakePHP\u306e\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u5225\u306e\u5834\u6240\u306b\u304a\u3044\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30c9\u30e1\u30a4\u30f3\u306e\u30eb\u30fc\u30c8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3057\u3066\u4f7f\u3046\u65b9\u6cd5\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<p>\u516c\u5f0f\u30da\u30fc\u30b8CakeBOok\u306e\u5fdc\u7528\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u30da\u30fc\u30b8\u306e\u4e00\u756a\u4e0b\u300c\u8907\u6570\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067 CakePHP \u3092\u5171\u6709\u3059\u308b\u300d\u306e\u3084\u308a\u65b9\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/book.cakephp.org\/2.0\/ja\/installation\/advanced-installation.html\">CakePHP 2x Cookbook \u5fdc\u7528\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\uff13\u3064\u306e\u90e8\u5206\u306b\u5206\u304b\u308c\u307e\u3059\u3002<br \/>\nA:\u3059\u3079\u3066\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3067\u4f7f\u3046CakePHP\u306e\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u5171\u901a\uff09<br \/>\nB:\u30d0\u30fc\u30c1\u30e3\u30eb\u30c9\u30e1\u30a4\u30f3\u3054\u3068\u306eCakePHP\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb<br \/>\nC:\u30d0\u30fc\u30c1\u30e3\u30eb\u30c9\u30e1\u30a4\u30f3\u3054\u3068\u306eCakePHP\u516c\u958b\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>A\u306e\u4f5c\u696d\u306fCakePHP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u304d\u306b1\u56de\u3060\u3051\u884c\u3048\u3070OK\u3067\u3059\u3002B\u3068C\u306e\u4f5c\u696d\u306f\u30d0\u30fc\u30c1\u30e3\u30eb\u30c9\u30e1\u30a4\u30f3\u3092\u5897\u3084\u3059\u3054\u3068\u306b\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\nCakePHP\u306e\u57fa\u672c\u7684\u306a\u52d5\u304d\u306f<br \/>\n\u30d6\u30e9\u30a6\u30b6\u3067\u300chttp:\/\/www.example.com\/sample\u300d\u3092\u5165\u529b\u2192\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e index.php\u304b\u3089CakePHP\u306e\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3002<br \/>\n\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308b\u306e\u306f \u300cindex.php\u300d\u300ccss\u30d5\u30a9\u30eb\u30c0\u300d \u300cjs\u30d5\u30a9\u30eb\u30c0\u300d \u7a0b\u5ea6\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>CakePHP Core\u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099<\/h3>\n<p>CakePHP\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u89e3\u51cd\u3057\u3066\u958b\u304f\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fb\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h23_28.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h23_28.png\" alt=\"2017-03-28_16h23_28\" width=\"593\" height=\"373\" class=\"alignnone size-full wp-image-3496\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h23_28.png 593w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h23_28-300x189.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/a><\/p>\n<p>lib \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u304f\u3068 Cake \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<br \/>\nCake\u306e\u4e2d\u8eab\u304cCakePHP\u306eCore\u30d5\u30a1\u30a4\u30eb\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4e0b\u8a18\u306e\u3088\u3046\u306a\u69cb\u6210\u3067\u3059\u3002\u3053\u308c\u3092\u3053\u308c\u304b\u3089\u4f5c\u308bCakePHP\u306eCore\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h24_35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h24_35.png\" alt=\"2017-03-28_16h24_35\" width=\"602\" height=\"507\" class=\"alignnone size-full wp-image-3498\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h24_35.png 602w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h24_35-300x253.png 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/a><\/p>\n<pre class=\"lang:default decode:true \" ># mkdir \/usr\/lib\/Cake\r\n# chmod 777 \/usr\/lib\/Cake\/\r\n# chown -R \u30e6\u30fc\u30b6\u30fc\u540d:\u30b0\u30eb\u30fc\u30d7\u540d \/usr\/lib\/Cake\/<\/pre>\n<p>\u4f5c\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300c\/usr\/lib\/Cake\/\u300d\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\nFTP\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h38_48.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h38_48.png\" alt=\"2017-03-28_16h38_48\" width=\"655\" height=\"921\" class=\"alignnone size-full wp-image-3504\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h38_48.png 655w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h38_48-213x300.png 213w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/a><br \/>\nCore\u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099\u306f\u3053\u308c\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u6e96\u5099<\/h3>\n<p>CakePHP\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7f6e\u304f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u300c\/home\/me\/\u300d\u3068\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305a\u300c\/home\/me\/\u300d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30d0\u30fc\u30c1\u30e3\u30eb\u30c9\u30e1\u30a4\u30f3\u3054\u3068\u306b\u3053\u306e\u4e2d\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" ># mkdir \/home\/me\r\n# chmod 777 \/home\/me\/\r\n# chown -R \u30e6\u30fc\u30b6\u30fc\u540d:\u30b0\u30eb\u30fc\u30d7\u540d \/home\/me\/<\/pre>\n<p>\u4eca\u56de\u306f\u300chttp:\/\/www.example.com\/sample\u300d\u3067\u5b9f\u9a13\u3092\u884c\u3046\u306e\u3067\u3001\/home\/me\/\u306e\u4e2d\u306b\u300csample\u300d\u3068\u3044\u3046\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u203b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u540d\u524d\u306f\u4efb\u610f\u3067\u69cb\u3044\u307e\u305b\u3093\u3002\u5f8c\u306b\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e index.php \u3067\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u540d\u524d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" ># mkdir \/home\/me\/sample\r\n# chmod 777 \/home\/me\/sample\/\r\n# chown -R \u30e6\u30fc\u30b6\u30fc\u540d:\u30b0\u30eb\u30fc\u30d7\u540d \/home\/me\/sample\/<\/pre>\n<p>CakePHP\u306e\u300capp\u300d\u306e\u4e2d\u8eab\u3092\u300c\/home\/me\/sample\/\u300d\u306bFTP\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u300capp\u300d\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h56_26.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_16h56_26.png\" alt=\"2017-03-28_16h56_26\" width=\"599\" height=\"316\" class=\"alignnone size-full wp-image-3513\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h56_26.png 599w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_16h56_26-300x158.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><br \/>\n\u3053\u308c\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6e96\u5099\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<h3>\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6e96\u5099<\/h3>\n<p>CakePHP\u306e\u300capp\u300d\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u300cwebroot\u300d\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u304c\u516c\u958b\u7528\u30d5\u30a1\u30a4\u30eb\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_17h01_05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_17h01_05.png\" alt=\"2017-03-28_17h01_05\" width=\"592\" height=\"172\" class=\"alignnone size-full wp-image-3514\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_17h01_05.png 592w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_17h01_05-300x87.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><br \/>\n\u3053\u308c\u3092\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u300c\/var\/www\/html\/sample\u300d\u306bFTP\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\uff08\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u81ea\u5206\u306e\u30d1\u30b9\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\uff09<br \/>\n\u3053\u308c\u3067\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6e96\u5099\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u3060\u3001\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u898b\u3066\u3082\u4f55\u3082\u8868\u793a\u3055\u308c\u306a\u3044\u304b\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u8a2d\u5b9a<\/h3>\n<p>\u516c\u958b\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308b\u300c.htaccess\u300d\u306e\u4e2d\u8eab\u3092\u6d88\u53bb\u3057\u3001\u4e0b\u8a18\u306e\u3082\u306e\u306b\u5165\u308c\u66ff\u3048\u307e\u3059\u3002<\/p>\n<div class=\"imgTitle\">.htaccess<\/div>\n<pre class=\"lang:default decode:true \" >&lt;IfModule mod_rewrite.c&gt;\r\n    RewriteEngine On\r\n    RewriteBase \/\r\n    RewriteCond %{REQUEST_FILENAME} !-d\r\n    RewriteCond %{REQUEST_FILENAME} !-f\r\n    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]\r\n&lt;\/IfModule&gt;<\/pre>\n<p>\u516c\u958b\u30d5\u30a9\u30eb\u30c0\u306b\u3042\u308b\u300cindex.php\u300d\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<div class=\"imgTitle\">\u5909\u66f4\u524d\u306eindex.php<\/div>\n<pre class=\"lang:default decode:true \" >\/**\r\n * Use the DS to separate the directories in other defines\r\n *\/\r\nif (!defined('DS')) {\r\n\tdefine('DS', DIRECTORY_SEPARATOR);\r\n}\r\n\r\n\/**\r\n * These defines should only be edited if you have CakePHP installed in\r\n * a directory layout other than the way it is distributed.\r\n * When using custom settings be sure to use the DS and do not add a trailing DS.\r\n *\/\r\n\r\n\/**\r\n * The full path to the directory which holds \"app\", WITHOUT a trailing DS.\r\n *\r\n *\/\r\nif (!defined('ROOT')) {\r\n\tdefine('ROOT', dirname(dirname(dirname(__FILE__))));\r\n}\r\n\r\n\/**\r\n * The actual directory name for the \"app\".\r\n *\r\n *\/\r\nif (!defined('APP_DIR')) {\r\n\tdefine('APP_DIR', basename(dirname(dirname(__FILE__))));\r\n}\r\n\r\n\/**\r\n * The absolute path to the \"cake\" directory, WITHOUT a trailing DS.\r\n *\r\n * Un-comment this line to specify a fixed path to CakePHP.\r\n * This should point at the directory containing `Cake`.\r\n *\r\n * For ease of development CakePHP uses PHP's include_path. If you\r\n * cannot modify your include_path set this value.\r\n *\r\n * Leaving this constant undefined will result in it being defined in Cake\/bootstrap.php\r\n *\r\n * The following line differs from its sibling\r\n * \/lib\/Cake\/Console\/Templates\/skel\/webroot\/index.php\r\n *\/\r\n\/\/define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');<\/pre>\n<p>\u5909\u66f4\u70b9\u306f\uff13\u304b\u6240\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n[\u6ce8\u610f\u70b9]<br \/>\n5\u884c\u76ee\uff1aCakePHP\u306eindex.php\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u533a\u5207\u308a\u306b\u300c\/\u300d\u3067\u306f\u306a\u304f\u300cDS\u300d\u3092\u4f7f\u3046\u3068\u3044\u3046\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\n\u30d1\u30b9\u3092\u66f8\u304f\u3068\u304d\u306f\u300c\/home\/me\/sample\u300d\u3067\u306f\u306a\u304f\u300cDS.&#8217;home&#8217;.DS.&#8217;me&#8217;.DS.&#8217;sample&#8217;\u300d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>[\u5909\u66f4\u70b91]<br \/>\n19\u884c\u76ee:\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u300c\/home\/me\u300d\u3068\u3057\u305f\u306e\u3067\u3001\u300c\tdefine(&#8216;ROOT&#8217;, DS . &#8216;home&#8217; . DS . &#8216;me&#8217;);\u300d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p>[\u5909\u66f4\u70b92]<br \/>\n27\u884c\u76ee:\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u300chome\/me\/sample\u300d\u3068\u3057\u305f\u306e\u3067\u3001\u300cdefine(&#8216;APP_DIR&#8217;, &#8216;sample&#8217;);\u300d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\n\u300c\/home\/me\u300d\u306f\u5909\u66f4\u70b91\u3067\u8a2d\u5b9a\u3057\u3066\u3042\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u306f\u300csample\u300d\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3060\u3051\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>[\u5909\u66f4\u70b93]<br \/>\n44\u884c\u76ee:CakePHP\u306e\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3002<br \/>\n\u5148\u982d\u306e\u300c\/\/\u300d\u3092\u5916\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<br \/>\n\u300cdefine(&#8216;CAKE_CORE_INCLUDE_PATH&#8217;, DS . &#8216;usr&#8217;. DS . &#8216;lib&#8217;);\u300d<br \/>\n\u203b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u300cdefine(&#8216;CAKE_CORE_INCLUDE_PATH&#8217;, ROOT . DS . &#8216;lib&#8217;);\u300d\u3068ROOT\u3068\u3044\u6587\u5b57\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u305f\u6642\u306e\u8a2d\u5b9a\u306b\u306a\u308b\u306e\u3067\u3001ROOT\u3092\u300cusr\u300d\u306b\u5909\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"imgTitle\">\u5909\u66f4\u5f8c\u306eindex.php<\/div>\n<pre class=\"lang:default decode:true \" >\r\n\/**\r\n * The full path to the directory which holds \"app\", WITHOUT a trailing DS.\r\n *\r\n *\/\r\nif (!defined('ROOT')) {\r\n\tdefine('ROOT', DS . 'home' . DS . 'me');\r\n}\r\n\r\n\/**\r\n * The actual directory name for the \"app\".\r\n *\r\n *\/\r\nif (!defined('APP_DIR')) {\r\n\tdefine('APP_DIR', 'sample');\r\n}\r\n\r\n\/**\r\n * The absolute path to the \"cake\" directory, WITHOUT a trailing DS.\r\n *\r\n * Un-comment this line to specify a fixed path to CakePHP.\r\n * This should point at the directory containing `Cake`.\r\n *\r\n * For ease of development CakePHP uses PHP's include_path. If you\r\n * cannot modify your include_path set this value.\r\n *\r\n * Leaving this constant undefined will result in it being defined in Cake\/bootstrap.php\r\n *\r\n * The following line differs from its sibling\r\n * \/lib\/Cake\/Console\/Templates\/skel\/webroot\/index.php\r\n *\/\r\ndefine('CAKE_CORE_INCLUDE_PATH', DS . 'usr'. DS . 'lib');<\/pre>\n<h3>\u8a73\u7d30\u8a2d\u5b9a<\/h3>\n<h4>\u30ad\u30e3\u30c3\u30b7\u30e5\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u8a2d\u5b9a<\/h4>\n<p>\u4e0a\u8a18\u306e\u72b6\u614b\u3067\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u3066\u6b21\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u3067\u305f\u3089\u3001\u9806\u8abf\u306b\u8a2d\u5b9a\u304c\u9032\u3093\u3067\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u4f7f\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >Warning: _cake_core_ cache was unable to write 'cake_dev_ja' to File cache in \/usr\/lib\/Cake\/Cache\/Cache.php on line 328\r\n\r\nWarning: \/home\/me\/sample\/tmp\/cache\/persistent\/ is not writable in \/usr\/lib\/Cake\/Cache\/Engine\/FileEngine.php on line 385\r\n\r\nFatal error: Uncaught exception 'CacheException' with message 'Cache engine \"_cake_core_\" is not properly configured. Ensure required extensions are installed, and credentials\/permissions are correct' in \/usr\/lib\/Cake\/Cache\/Cache.php:186 Stack trace: #0 \/usr\/lib\/Cake\/Cache\/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 \/home\/me\/sample\/Config\/core.php(374): Cache::config('_cake_core_', Array) #2 \/usr\/lib\/Cake\/Core\/Configure.php(72): include('\/home\/me\/sample...') #3 \/usr\/lib\/Cake\/bootstrap.php(175): Configure::bootstrap(true) #4 \/var\/www\/html\/sample\/index.php(104): include('\/usr\/lib\/Cake\/b...') #5 {main} thrown in \/usr\/lib\/Cake\/Cache\/Cache.php on line 186<\/pre>\n<p> \u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" ># chmod 777 -R \/home\/me\/sample<\/pre>\n<p>\u518d\u5ea6\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u8d64\u3068\u9ec4\u8272\u306e\u5e2f\u306e\u90e8\u5206\u3092\u5bfe\u51e6\u3057\u3066\u7dd1\u8272\u306b\u5909\u3048\u3066\u3044\u304d\u307e\u3059\u3002\uff08\u8a2d\u5b9a\u304c\u3046\u307e\u304f\u3044\u304f\u3068\u7dd1\u8272\u306b\u306a\u308a\u307e\u3059\uff09<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h12_27.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h12_27-1024x658.png\" alt=\"2017-03-28_18h12_27\" width=\"1024\" height=\"658\" class=\"alignnone size-large wp-image-3548\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h12_27-1024x658.png 1024w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h12_27-300x193.png 300w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h12_27.png 1121w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<h4>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a<\/h4>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306eConfig\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u300cdatabase.php.default\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u3002\u30d1\u30b9\u306f\u300c\/home\/me\/sample\/Config\/database.php.default\u300d\u3067\u3059\u3002<br \/>\n\u2193\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eConfig\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u69cb\u6210<br \/>\n<a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_17h38_21.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_17h38_21.png\" alt=\"2017-03-28_17h38_21\" width=\"590\" height=\"184\" class=\"alignnone size-full wp-image-3535\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_17h38_21.png 590w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_17h38_21-300x94.png 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p>\u3053\u308c\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5185\u5bb9\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >class DATABASE_CONFIG {\r\n\r\n\tpublic $default = array(\r\n\t\t'datasource' =&gt; 'Database\/Mysql',\r\n\t\t'persistent' =&gt; false,\r\n\t\t'host' =&gt; 'localhost',\r\n\t\t'login' =&gt; 'user',\r\n\t\t'password' =&gt; 'password',\r\n\t\t'database' =&gt; 'database_name',\r\n\t\t'prefix' =&gt; '',\r\n\t\t\/\/'encoding' =&gt; 'utf8',\r\n\t);\r\n\r\n\tpublic $test = array(\r\n\t\t'datasource' =&gt; 'Database\/Mysql',\r\n\t\t'persistent' =&gt; false,\r\n\t\t'host' =&gt; 'localhost',\r\n\t\t'login' =&gt; 'user',\r\n\t\t'password' =&gt; 'password',\r\n\t\t'database' =&gt; 'test_database_name',\r\n\t\t'prefix' =&gt; '',\r\n\t\t\/\/'encoding' =&gt; 'utf8',\r\n\t);<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u4e0b\u306e\u307b\u3046\u306b\u4e0a\u8a18\u306e\u3088\u3046\u306a\u8a18\u8f09\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u306e public $default\u3000\u90e8\u5206\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u3068\u51fa\u305f\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u304c\u540c\u3058\u5834\u5408\u306f\u4e0b\u8a18\u306e\uff13\u304b\u6240\u306e\u8a2d\u5b9a\u3092\u3059\u308c\u3070OK\u3067\u3059\u3002<br \/>\n\u300clogin\u300d\u300cpassword\u300d\u300cdatabase\u300d<br \/>\n\u3053\u306e\uff13\u3064\u3092\u5909\u66f4\u3057\u305f\u3089\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u300cdatabase.php\u300d\u306b\u5909\u66f4\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eConfig\u30d5\u30a9\u30eb\u30c0\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u30d6\u30e9\u30a6\u30b6\u3067\u30da\u30fc\u30b8\u3092\u898b\u305f\u3068\u304d\u306b\u5148\u307b\u3069\u307e\u3067\u9ec4\u8272\u3044\u8868\u793a\u3060\u3063\u305f<br \/>\nYour database configuration file is NOT present.<br \/>\nRename APP\/Config\/database.php.default to APP\/Config\/database.php<br \/>\n\u304c\u7dd1\u306b\u5909\u66f4\u3055\u308c\u3066\u3044\u308c\u3070\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u306fOK\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h13_51.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h13_51-1024x708.png\" alt=\"2017-03-28_18h13_51\" width=\"1024\" height=\"708\" class=\"alignnone size-large wp-image-3550\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h13_51-1024x708.png 1024w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h13_51-300x207.png 300w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h13_51.png 1121w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\n\u3053\u306e\u3088\u3046\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4>Security\u306e\u8a2d\u5b9a<\/h4>\n<p>\u5f8c\u306f\u8d64\u3044\uff12\u3064\u306eNotice\u304c\u6d88\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u30da\u30fc\u30b8\u306e\u4e00\u756a\u4e0a\u306b\uff12\u3064\u51fa\u3066\u3044\u307e\u3059\u3002<br \/>\nNotice (1024): Please change the value of &#8216;Security.salt&#8217; in APP\/Config\/core.php to a salt value specific to your application.<br \/>\n\u3053\u308c\u3089\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eConfig\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u3042\u308bcore.php\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >\/**\r\n * A random string used in security hashing methods.\r\n *\/\r\n\tConfigure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');\r\n\r\n\/**\r\n * A random numeric string (digits only) used to encrypt\/decrypt strings.\r\n *\/\r\n\tConfigure::write('Security.cipherSeed', '76859309657453542496749683645')\r\n<\/pre>\n<p>2\u304b\u6240\u5909\u66f4\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n4\u884c\u76ee\uff1a\u300cDYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi\u300d\u3092\u534a\u89d2\u30ed\u30fc\u30de\u5b57\u30fb\u534a\u89d2\u6570\u5b57\u3092\u542b\u3080\u4efb\u610f\u306e\u6587\u5b57\u5217\u306b\u5909\u66f4<br \/>\n9\u884c\u76ee\uff1a\u300c76859309657453542496749683645\u300d\u3092\u4efb\u610f\u306e\u534a\u89d2\u6570\u5b57\u306b\u5909\u66f4\u3002<br \/>\n\u5909\u66f4\u5f8c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eCOnfig\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h05_51.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.searchlight8.com\/wp\/wp-content\/uploads\/2017\/03\/2017-03-28_18h05_51-971x1024.png\" alt=\"2017-03-28_18h05_51\" width=\"971\" height=\"1024\" class=\"alignnone size-large wp-image-3544\" srcset=\"https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h05_51-971x1024.png 971w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h05_51-285x300.png 285w, https:\/\/www.searchlight8.com\/wp-content\/uploads\/2017\/03\/2017-03-28_18h05_51.png 1121w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/a><\/p>\n<p>\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u306e\u300cDebugKit\u300d\u306f\u4f7f\u308f\u306a\u3044\u4eba\u3082\u3044\u308b\u306e\u3067\u3001\u4f7f\u3046\u3068\u304d\u306b\u8a2d\u5b9a\u3059\u308c\u3070\u3088\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30a8\u30e9\u30fc\u5bfe\u51e6<\/h3>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u3044\u305f\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408\u3001\u4f55\u3082\u8868\u793a\u3055\u308c\u306a\u3044\u5834\u5408\u306a\u3069\u306fapach\u306e\u30ed\u30b0\u3092\u898b\u3066\u307f\u307e\u3059\u3002<br \/>\n \u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c<\/p>\n<pre class=\"lang:default decode:true \" ># less \/var\/log\/httpd\/error_log<\/pre>\n<p>\u300cCtrl + G\u300d\u3067\u6700\u7d42\u884c\u3092\u898b\u308b\u3068\u3001\u6700\u65b0\u306e\u30a2\u30af\u30bb\u30b9\u306b\u5bfe\u3059\u308b\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c.htaccess\u300d\u304c\u4f7f\u3048\u306a\u3044\u3068CakePHP\u304c\u52d5\u304b\u306a\u3044\u306e\u3067\u3001.htaccess\u304c\u6709\u52b9\u304b\u3069\u3046\u304b\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c\u306a\u3069\u3092\u884c\u3063\u3066\u307f\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CakePHP2\u3092Linux\u30b5\u30fc\u30d0\u30fc\u306b\u30a4&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2890,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,14],"tags":[58,104],"class_list":["post-3495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cakephp","category-linux","tag-cakephp","tag-104","wpcat-9-id","wpcat-14-id"],"_links":{"self":[{"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/posts\/3495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/comments?post=3495"}],"version-history":[{"count":54,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/posts\/3495\/revisions"}],"predecessor-version":[{"id":3561,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/posts\/3495\/revisions\/3561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/media\/2890"}],"wp:attachment":[{"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/media?parent=3495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/categories?post=3495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchlight8.com\/wp-searchlight8\/wp-json\/wp\/v2\/tags?post=3495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}