LoginSignup
0
1

More than 5 years have passed since last update.

CentOSにcakephpをインストールしてみた

Posted at

[PHP] CentOSにcakephpをインストールしてみた

まずはcakephpのインストール
GitHubからファイルをインストール

git clone -b 2.x git://github.com/cakephp/cakephp.git

ダウンロードしたファイルを

var/www/html

に移動。

ブラウザーで開くと下記のエラーが発生。

Warning: cake_core cache was unable to write 'cake_dev_ja' to File cache in /var/www/html/cakephp/lib/Cake/Cache/Cache.php on line 328

Warning: /var/www/html/cakephp/app/tmp/cache/persistent/ is not writable in /var/www/html/cakephp/lib/Cake/Cache/Engine/FileEngine.php on line 385

Fatal 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 /var/www/html/cakephp/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /var/www/html/cakephp/lib/Cake/Cache/Cache.php(151): Cache::buildEngine('_cake_core') #1 /var/www/html/cakephp/app/Config/core.php(384): Cache::config('cake_core', Array) #2 /var/www/html/cakephp/lib/Cake/Core/Configure.php(72): include('/var/www/html/c...') #3 /var/www/html/cakephp/lib/Cake/bootstrap.php(432): Configure::bootstrap(true) #4 /var/www/html/cakephp/app/webroot/index.php(98): include('/var/www/html/c...') #5 /var/www/html/cakephp/index.php(41): require('/var/www/html/c...') #6 {main} thrown in /var/www/html/cakephp/lib/Cake/Cache/Cache.php on line 186

cakePHP は一時的にファイルを作成することがあるため、そのための書き込み権限を付与する必要がある。

cd /var/www/html/cakephp/app
chmod -R 777 tmp

これで準備OK

0
1
0

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
0
1