前提・実現したいこと
php超入門という書籍を用いて勉強始めました。
XAMPP環境でcakephp3.xを使用した前提となっていますが,当方4.0をダウンロードして進めています。
表示されてるエラーの修正
デバッグキットの表示:右下にアイコンが出てきません
この2点が現状の課題です
まだ始めたてなもので、十分な情報量でない場合お知らせいただけると幸いです。
発生している問題・エラーメッセージ
Warning(512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/models/myapp_cake_model_debug_kit_requests): failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/models/myapp_cake_model_debug_kit_requests) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/models/myapp_cake_model_debug_kit_panels) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/models/myapp_cake_model_debug_kit_panels) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.debug_kit.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.default.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.default.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.debug_kit.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.cake.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): SplFileInfo::openFile(/opt/lampp/htdocs/mycakeapp/tmp/cache/persistent/myapp_cake_core_translations.cake.en_US) [<a href='https://secure.php.net/splfileinfo.openfile'>splfileinfo.openfile</a>]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 372] Warning (512): Unable to emit headers. Headers sent in file=/opt/lampp/htdocs/mycakeapp/vendor/cakephp/cakephp/src/Error/Debugger.php line=954 [CORE/src/Http/ResponseEmitter.php, line 71] Warning (2): Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/mycakeapp/vendor/cakephp/cakephp/src/Error/Debugger.php:954) [CORE/src/Http/ResponseEmitter.php, line 168] Warning (2): Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/mycakeapp/vendor/cakephp/cakephp/src/Error/Debugger.php:954) [CORE/src/Http/ResponseEmitter.php, line 197]
ソースコード
php
1<?php 2namespace App\Controller; 3 4use App\Controller\AppController; 5 6class HelloController extends AppController { 7 8 public $autoRender = false; 9 10 public function index() { 11 echo "<html><body><h1>Hello!</h1>"; 12 echo "<p>This is sample page.</p></body></html>"; 13 } 14}
試したこと
以下二つを参考にしてみましたが解決に至っていません
デバッグキットに関して
if (Configure::read('debug')) { Configure::write('Cache._cake_model_.duration', '+2 minutes'); Configure::write('Cache._cake_core_.duration', '+2 minutes'); // disable router cache during development Configure::write('Cache._cake_routes_.duration', '+2 seconds'); // Configure::write('DebugKit.panels', ['DebugKit.Packages' => true]); // Configure::write('DebugKit.safeTld', ['com']); Configure::write('DebugKit.forceEnable', true); }
パーミッションに関して
対象と思われるファイルの権限は777にしてみました
(base) perrymb:persistent a0000$ ls -l total 24 -rwxrwxrwx 1 a0000 staff 526 11 9 18:48 myapp_cake_core_translations.cake.en_US -rwxrwxrwx 1 a0000 staff 526 11 9 18:48 myapp_cake_core_translations.debug_kit.en_US -rwxrwxrwx 1 a0000 staff 284 11 9 18:48 myapp_cake_core_translations.default.en_US (base) perrymb:persistent a0000$ cd ../ (base) perrymb:cache a0000$ cd models/ (base) perrymb:models a0000$ ls -l total 16 -rwxrwxrwx 1 a0000 staff 2049 11 9 18:48 myapp_cake_model_debug_kit_panels -rwxrwxrwx 1 a0000 staff 1565 11 9 18:48 myapp_cake_model_debug_kit_requests
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/11/11 04:14
2020/11/11 04:30
2020/11/11 04:35
2020/11/11 06:54
2020/11/11 06:58
2020/11/11 23:49
2020/11/12 04:42